I am trying an "IF" formula to see if A1 matches B1 and if so I want to return C1 but if the two cell are blank its working I want to exclude blanks, and it is date's that I am working with.
So if A1 contains 1/1/13 and B1 contains 1/1/13 then it is to return the value in C1. But what is happening also if A1 is blank and B1 is blank it is returning the value in C1 and I don't want that. Any help appreciated
If you are checking a cell for a zero value and the cell is blank, the test evaluates to true. If the range might contain a blank cell, you should use the ISBLANK function to test for a zero value, enter the below mentioned formula in C1 and it should work now:
Just one other thing I notice when I use the formula is that if both cells are blank I want to return a blank. What I am finding is if the two cells are blank it still returns what in the cell
So if A1 contains 1/1/13 and B1 contains 1/1/13 then it is to return the value in C1. But what it is also happening if both cells are showing blank is still shows what is in C1 as it is matching the two blanks
Hi Zohaib, thank for this sory for the late answer but I have been away on business, I have open the file and it works fine but what I have noticed is that insted of the blank cell I have a formula in the cell it does not work is there anyway your formula can be change so that that it can work with a formula in the cell.
It is blank, I have got the formula =IF(A1="","",A1) and the is a date that it is picking up and in the other cell the your formula is working on has =IF(B1="","",B1) and as I said using the formula that you have provided if A and B have the same date the it will give me cell C what I am finding is if the are both blank it is also giving me cell C.
I am sorry, I find it a little difficult to understand your question. In the sheet that I uploaded I have mentioned the formula =IF(ISBLANK(A2),"",IF(B2=A2,A2,"")). It is not clear from your post if you have changed my formula or you are referring to a different formula altogether. It would be helpful if you could upload the sample file to the following mentioned website: