help needed with complicated multiple IF summation

strewth78

New Member
Joined
Jan 21, 2017
Messages
15
I want to look into cell W7. If it is a number, then show that number.
if not, then i want to do a vlookup(D7,'2017'!A:G,7,).
However if there is no number in that vlookup, then go back to W7...
if W7 says 'pre-arb' then display number 535000.
if it doesnt say pre-arb, then display '-'

here is what ive tried...

=IF(ISNUMBER(W7),W7,IFERROR(VLOOKUP(D7,'2017'!A:G,7,),IF(W7="pre-arb",535000,"-")))

I can see it gets stuck after the isnumber function. so if there is a number in W7 it produces it, if not it returns zero. Im sure im just messing up the iferror part somehow, but ive become lost at what it is... probably something simple.

any help? much appreciated!
 
I'll try again, as my posts seem to have been missed.

Try this:

=IF(ISNUMBER(W7),W7,IF(ISERROR(VLOOKUP(D7,'2017'!A:G,7,)),IF(W7="pre-arb",535000,"-")))

Sorry Ali. As i said above it returns a FALSE result, no matter what is in w7
 
Upvote 0

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
What about this?

=IF(ISNUMBER(W7),W7,IF(ISNA(VLOOKUP(D7,'2017'!A:G,7,)),IF(W7="pre-arb",535000,"-")))
 
Upvote 0
the only way your formula returns 0 is if W7 value = 0 or vlookup returns 0 (D7 value in A column corresponds to 0 value in G column in 2017 sheet).

If there is a value in the vlookup it returns it. But when I empty that cell the result becomes zero.
 
Upvote 0
Then it must be something to do with your data. Are you able to provide a DropBox link or similar to the workbook?
 
Upvote 0
I thought If the cell was empty in the vlookup them it would fail to return anything, but it's returning zero for an empty cell. I think I need to add a part so that if the vlookup returns a number less than 1 then it should move on to the following IF.
 
Upvote 0
OK.

=IF(ISNUMBER(W7),W7,IF(VLOOKUP(D7,'2017'!A:G,7,)>0,VLOOKUP(D7,'2017'!A:G,7,),IF(W7="pre-arb",535000,"-"))))
 
Upvote 0
In fact it was identical to the one I just tried myself. I think it's right but just not quite written right.
 
Upvote 0
=IF(ISNUMBER(W7),W7,IFERROR(if(VLOOKUP(D7,'2017'!A:G,7,)=0,"no zero value",VLOOKUP(D7,'2017'!A:G,7,)),,IF(W7="pre-arb",535000,"-")))

If G column is "", then it will return 0, that's correct for the function, and there's nothing you can do, only avoid this 0 with a statment.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,144
Messages
6,129,120
Members
449,488
Latest member
qh017

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