Having problems adding several columns up.

georj

Board Regular
Joined
Oct 13, 2003
Messages
74
i have several lookups like this one "=VLOOKUP($P2,weight,2,FALSE)" when it can not find something it puts #N/A i have two other lookups which do the same thing sort of thing but when i come to add the columns together it cant because of the #N/A now two columns may have numbers in them but the third might not is there a way round this please.

thank you for your time and help

Jason
 

Excel Facts

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

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
You can either eliminate the error like this:

=IF(ISNA(VLOOKUP($P2,weight,2,FALSE)),0,VLOOKUP($P2,weight,2,FALSE))

or sum excluding the NA values like this:

=SUMIF(A1:C1,"<>#N/A")
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
55,853
Office Version
  1. 365
Platform
  1. Windows
Jason

One way is this:
=IF(ISNA(VLOOKUP($P2,weight,2,0)),"",VLOOKUP($P2,weight,2,0))
 

georj

Board Regular
Joined
Oct 13, 2003
Messages
74
Thank you both for all your help both ways worked.
have a good day and take care

Jason
 

Forum statistics

Threads
1,172,168
Messages
5,879,432
Members
433,430
Latest member
lukerjordan7

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
Top