Hello
I'm trying to write a formula that uses a lookup. If the result of the lookup is a "." then I want to return a 0. Otherwise I want to return whatever value is there.
Having difficulty getting this to work. Can anyone help.
Thanks
Hello
I'm trying to write a formula that uses a lookup. If the result of the lookup is a "." then I want to return a 0. Otherwise I want to return whatever value is there.
Having difficulty getting this to work. Can anyone help.
Thanks
Last edited by Dan27; 04-14-2010 at 06:44 AM.
Try this:
=IF(VLOOKUP(C1, M1:N12, 2, FALSE)=".", 0, VLOOKUP(C1, M1:N12, 2, FALSE))
I've tried this but it isn't working. It's still returning a "."
Here's my formula as entered
=IF(VLOOKUP(D2,[TEST_v3.xls]DATA!$A:$AK,31,0)=".","0",VLOOKUP(D2,[TEST_v3.xls]DATA!$A:$AK,31,0))
Any ideas?
Can you upload example?
Thanks, your formula works. On the spreadsheet I was referencing a cheeky little space had popped in after the "." which is why it didn't seem to be working
Thanks
Hi, This formula was very useful. I am however trying to take it one step further. Can you please help me. This is what I am trying to do.
If the result of the lookup is <2012 then I want it to say"Existing" which is happening but the next part is what is stumping me.
If the result gives me a #N/A which basically means that there is no matching data, then I want to return "New".
Is this possible?
Thanks
GV
GVishnu,
Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks