Vlookup

matthewlouis

Active Member
Joined
Mar 28, 2014
Messages
374
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Column R18 uses the formula =IFERROR(IF(D18<$H$3,"Failed",""),"")

D = current price

$H$3 is the price I am comparing D18 to. $H$3 is constant, of course

Once the price in Column D becomes LESS THAN the fixed price of $H$3, the cell in R18 says "FAILED." That's great. But when I copy the formula down and the cells in Column D become > than $H$3 again, Column D's price shows up again . . . I don't want that. Once a cell in Column R says "FAILED, I want every Column R cell AFTER that to say "FAILED" regardless if any of the following prices in Column D show up > $H$3 somewhere down the column.

This is messing up my Lookup formula in R4 =IFERROR(VLOOKUP("Failed",$R$6:$R$133,1,FALSE),"") because it's looking up everything AFTER R18 and including it in the Lookup.

Any ideas? Thanks in advance!!
 
Last edited:
That makes no sense to me.

So, you are seeing "#ERROR " in cell B20, but
=ISERROR(B20) returns FALSE
=IFERROR(B20,"Error found!") returns a blank
=B20="#ERROR " returns #ERROR again

Is that correct?
That does not make any sense to me. These tests suggest that it is not an error or a string.
We have to figure out what it is so we can capture it and address it.

Are you still seeing "#ERROR" in cell B20, or did you remove it or change something?
 
Last edited:
Upvote 0

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Yes, that is correct on all three items you stated.

This is the formula in B20 with no conditional formats or conditional formulas (returns #ERROR )

=IF(A20=$H$3,xlqHigh($A$1,"Yahoo"),xlqhHigh($A$1,A20,"Yahoo"))

A20 = today's date
$H$3 = today's date
$A$1 = ^GSPC (symbol for S&P 500 Index)
 
Last edited:
Upvote 0
I wish I could see the coding behind the "xlqhHigh" function to see how it is working. It is behaving very oddly. It seems to not be returning a String or an Error when this error message happens, so the question is, what is it?

When there isn't an error, and it works, does it return a numeric value?

If so, perhaps we can adjust our original formula to this:
Code:
[COLOR=#333333]=IF(AA19="Failed","Failed",IF([/COLOR][COLOR=#ff0000]IF(ISNUMBER(B20),B20,0)[/COLOR][COLOR=#333333]>$G$3,"Failed",""))
[/COLOR]
 
Upvote 0
Viola!!!! You just fixed it, Joe!! Nice, thank you so much for sticking with this. Appreciate it.

Yes, when it works, it provides a number.

Thanks again!
 
Last edited:
Upvote 0
Whew! Excellent!
Glad we were able to finally crack it.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,215
Members
453,024
Latest member
Wingit77

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