Hi, I am doing a simple subtraction, i.e. =E21-G21.
I am subtracting two Vlookup vormulas that looks like this
I am getting a #Value error if they both return a value = "".=IF(COUNTIF($I$1:$I$83,"IC Prov ")=0,"",INDEX($W$1:$W$83,SMALL(IF($I$1:$I$83="IC Prov ",ROW($I$1:$I$83)-ROW($I$1)+1),MIN(2,COUNTIF($I$1:$I$83,"IC Prov "))))) & =IF(COUNTIF($I$1:$I$83,"IC Prov ")=0,"",INDEX($W$1:$W$83,SMALL(IF($I$1:$I$83="IC Prov ",ROW($I$1:$I$83)-ROW($I$1)+1),MIN(1,COUNTIF($I$1:$I$83,"IC Prov ")))))
How do I fix it? the IF() command does not work here.
Last edited by sonar123; 03-06-2011 at 06:38 AM.
Validate both contain numbers prior to coercing
or, given use of XL2007=IF(COUNT(E21,G21)<2,"n/a",E21-G21)
modify n/a per preference=IFERROR(E21-G21,"n/a")
(obviously in your OP the formulae are identical...ie result of subtraction would only ever be #VALUE! or 0)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
In Excel 2007 you can use the IFERROR() function
=IFERROR(E21-G21,"")
PS - say Hi to my sister down there!
You guys really know your stuff.
Thanks a mill.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks