Adding Similar Vlookup Values

pvkvimalan

New Member
Joined
Dec 19, 2017
Messages
27
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Dear All,

I first thank the Admin & contributors of the forum for having provided a platform to learn & discuss.

This is my first post in the forum. I'm in need of a help.

I'm in process of making a Tracker for 10 Elements in order to complete 1 Activity. There are 100 such activities.
Under each Element, there are drop down list with 4 Status. (Not Started, Draft, Final Draft, Submitted)
Each Status has values assigned in a new sheet "Sheet1". (Not Started=0,Draft=2%, Final Draft=5%, Submitted=10%)
I would like to get the value of these elements added to form the results.

Right now I'm using Vlookup formula and it seems working fine. However, the length of the formula is getting large, as the number of elements being added

eg.C5 =(VLOOKUP(D5,Sheet1!$C$2:$D$5,2,FALSE))+(VLOOKUP(E5,Sheet1!$C$2:$D$5,2,FALSE))+(VLOOKUP(F5,Sheet1!!$C$2:$D$5,2,FALSE))...... And So on.

I would like to reduce the formula with any other function. Kindly provide valuable inputs.

The table in Sheet1 is as follows


[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]#[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Not Started[/TD]
[TD]0%[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Draft[/TD]
[TD]2%[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][TABLE="width: 112"]
<tbody>[TR]
[TD]Final Draft[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]5%[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][TABLE="width: 112"]
<tbody>[TR]
[TD]Submitted[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]10%[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
The typical solution for reducing a formula size would be to split the formula across additional cells, where you may have additional columns that are doing individual VLOOKUP functions and then you have one formula in C5 that is just adding those cells together.

Another option is to use a COUNTIFS function to count how many of each type is in the row, then multiply that by the VLOOKUP formula. it would still be a rather large formula, but may save you some space.
 
Upvote 0
The typical solution for reducing a formula size would be to split the formula across additional cells, where you may have additional columns that are doing individual VLOOKUP functions and then you have one formula in C5 that is just adding those cells together.

Another option is to use a COUNTIFS function to count how many of each type is in the row, then multiply that by the VLOOKUP formula. it would still be a rather large formula, but may save you some space.


Dear AFPathfinder,

Thank you for your swift response. I used the 1st solution, the vlookup calculation is now placed in the background and it has considerably reduced the formula. However, I'm interested to try how the 2nd Solution works.

 
Upvote 0
It would be something like this:
Code:
=COUNTIFS(B2:K2,"=Not Started")*VLOOKUP("Not Started",Sheet1!$C$2:$D$5,2,FALSE)
+COUNTIFS(B2:K2,"=Draft")*VLOOKUP("Draft",Sheet1!$C$2:$D$5,2,FALSE)
+COUNTIFS(B2:K2,"=Final Draft")*VLOOKUP("Final Draft",Sheet1!$C$2:$D$5,2,FALSE)
+COUNTIFS(B2:K2,"=Submitted")*VLOOKUP("Submitted",Sheet1!$C$2:$D$5,2,FALSE)

Also, in-cell carriage returns (Alt+Enter) do not hinder formulas, so you can help readability by layering functions (sometimes, anyway).
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top