Gareth has attended:
Excel VBA Intro Intermediate course
Excel Intermediate course
Excel Advanced course
IF function not working.
Hey
I have a bit of a problem with my If Function.
I have two dates in two seperate colums. in the format dd/mm/yyyy. The columns are W and Q.
I have input an If Function along the lines of =If (W2=Q2), "", "Re-allocate"
The problem i'm having is that when the two dates match in both columns the formula is still returning "Re-allocate".
I think the problem might lie with the formatting of column Q. The date shown is the date retrieved from a vlookup function, from another sheet, that includes a time of day as well such as 00:00:00. The v lookup is only returning the date however.
Any thoughts as to why this is not matching? or Excel not recognising the two as the same date?
Thanks
RE: IF function not working.
Hello Gareth
Thank you for your question.
Would it be possible for you to email in a copy of the spreadsheet (or a similar example), including the sheet that the vlookup data? If so please email to amanda@stl-training.co.uk
Kind regards
Amanda
RE: IF function not working.
Thanks amanda. Example Copy sent.
RE: IF function not working.
Hello Gareth
Thank you for sending through the spreadsheet.
I don't think that the problem lies in the formatting, I think it is to do with the fact that you are getting Excel to try and compare something that is a value (the date in column A) with something that is the result of a formula (the result of the lookup in column C) - you're not comparing apples with apples here.
I tried copying the date from column C and pasting it as a value in a different cell, and changing the IF function and then it worked. I can't think of an easy solution for this, but I hope this helps to explain why the formula isn't working as you expect.
Kind regards
Amanda