tweak my formula :)

JacksonTyler

New Member
Joined
Oct 5, 2014
Messages
5
=IF(ISNUMBER(MATCH(TRUE,COUNTIF(INDIRECT("'"&$Z$1:$Z$10&"'!d4:d200"),E7)>0,0)),VLOOKUP(E7,INDIRECT("'"&INDEX($Z$1:$Z$10,MATCH(TRUE,COUNTIF(INDIRECT("'"&$Z$1:$Z$10&"'!d4:d200"),E7)>0,0))&"'!d4:P200"),9,0),"")

how do i setup another if statement within this formula so that if the value is blank it doesn't show up as a "0"?

greatly appreciate the help
Thank you
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Will your VLOOKUP always return text values? If so, you could add a simple &"" to the end of your formula:

=IF(ISNUMBER(MATCH(TRUE,COUNTIF(INDIRECT("'"&$Z$1:$Z$10&"'!D4:D200"),E7)>0,0)),VLOOKUP(E7,INDIRECT("'"&INDEX($Z$1:$Z$10,MATCH(TRUE,COUNTIF(INDIRECT("'"&$Z$1:$Z$10&"'!D4:D200"),E7)>0,0))&"'!D4:P200"),9,0),"")&""

If VLOOKUP can return text or number values(?) it gets a little more complicated, because presumably you'll want to show zero if the VLOOKUP returns zero, but not if it returns blank?

Incidentally, if you have Excel 2007 or later, you could simplify your formula to:

=IFERROR(VLOOKUP(E7,INDIRECT("'"&INDEX($Z$1:$Z$10,MATCH(TRUE,COUNTIF(INDIRECT("'"&$Z$1:$Z$10&"'!D4:D200"),E7)>0,0))&"'!D4:P200"),9,0),"")
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,367
Members
449,080
Latest member
Armadillos

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