Stuck on an Excel 2007 IF statement

Soldato
Joined
7 Mar 2011
Posts
6,859
Location
Oldham, Lancashire
I just can't get it to do what I want ...

Basically, turn TRUE to 1 and FALSE to 0 but I can't get it working with a lookup function. The Lookup show true/false correctly. Any Ideas?

So far...

PHP:
=IF(LOOKUP("WHSE\DES\40-W", Data!B:B, Data!C:C) = "TRUE", 1, 0)
 
remove the double quotes around "TRUE"?

EDIT:

Actually use IFERROR

Code:
=IF(IFERROR(LOOKUP("WHSE\DES\40-W", Sheet2!B:B, Sheet2!C:C), FALSE) = FALSE, FALSE, TRUE)
 
Last edited:
No probs, I also posted another fix if the lookup value doesn't exist! :)

The IFERROR function returns a value you set if the formula you pass to it (the lookup in this case) has an error. Useful stuff!
 
No probs, I also posted another fix if the lookup value doesn't exist! :)

The IFERROR function returns a value you set if the formula you pass to it (the lookup in this case) has an error. Useful stuff!

Sir you are a gentleman and a schollar.

This could actually help more than I thought. I use a client/server based software to manage a the 45' trailers at warehouse and a few yards. I use it to look after just over 60 loading/unloading bays and about 300 parking spaces.

The server sends me an email every 30 mins with an excel file with the full data of all the trailers in the business, location, contents, any damage etc. Just in case it goes down.

Well there is a server migration at the weekend, and I don't fancy doing it all on scraps of paper like the old department used to (my team is a new department and took this on). I just copy the Emaild data into Sheet2 and have a trillion lookups on a mock-up of the software's main screen on sheet1.

I'm about to finish for the night but when I come back I'm gonna see if IFERROR fixes my issue with empty spaces in the yard. It will just use the closest one from the lookup data, instead of leaving it empty.
 
Back
Top Bottom