#value error when using a sum function that includes vlookup cell references

Rusty315

Board Regular
Joined
Sep 13, 2012
Messages
54
Hi all

I'm using this formula:

=SUM(VLOOKUP((B82&C82),wkone,4,0),VLOOKUP((B82&C82),wktwo,4,0),VLOOKUP((B82&C82),wkthree,4,0),VLOOKUP((B82&C82),wkfour,4,0),VLOOKUP((B82&C82),wkfive,4,0))

I get a #VALUE error where any value returned by one of the VLOOKUPs is text. I've done a little research and apparently the SUM function is meant to help avoid those errors as opposed to using a simple arithmetic arguments (=a2+b2) but I can't find anything about the use of functions within the sum itself.

I need the formula to ignore text entries. How can I go about doing that?

Appreciate any help!

Cheers
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi Skyin4

I'm using & instead of : because in the tables that I'm referencing (wkone, wktwo, etc) I've concatenated columns B and C in column A, then I do a vlookup for the concatenated value which is represented as (for example) 'B2&C2'. I'm looking in column 4 because there are a total of 8 columns in the table that I'm using and I need a sum of the values in the fourth column of each of the tables.

The VLOOKUP is working fine when I have numbers or empty cells so that isn't the issue. My issue is that when I have text in any of the cells I'm looking up, I get the #VALUE error so I need to find a way to add the numerical values and ignore the text.

I'm not sure how to go about posting up a copy of the workbook but I'm happy to do that.

Thanks for your help!
 
Last edited:
Upvote 0
Hi all

I'm using this formula:

=SUM(VLOOKUP((B82&C82),wkone,4,0),VLOOKUP((B82&C82),wktwo,4,0),VLOOKUP((B82&C82),wkthree,4,0),VLOOKUP((B82&C82),wkfour,4,0),VLOOKUP((B82&C82),wkfive,4,0))

I get a #VALUE error where any value returned by one of the VLOOKUPs is text. I've done a little research and apparently the SUM function is meant to help avoid those errors as opposed to using a simple arithmetic arguments (=a2+b2) but I can't find anything about the use of functions within the sum itself.

I need the formula to ignore text entries. How can I go about doing that?

Appreciate any help!

Cheers

=SUM(CHOOSE({1,2,3,4,5},VLOOKUP((B82&C82),wkone,4,0),VLOOKUP((B82&C82),wktwo,4,0),VLOOKUP((B82&C82),wkthree,4,0),VLOOKUP((B82&C82),wkfour,4,0),VLOOKUP((B82&C82),wkfive,4,0)))

This does not handle the #N/A error if that also occurs.
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,680
Members
449,116
Latest member
HypnoFant

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