Matching cells but exclude blanks [Solved/Closed]

Tom9o
Posts
11
Registration date
Monday February 18, 2013
Last seen
September 15, 2013
- Mar 11, 2013 at 01:40 PM - Latest reply:  Hira
- Jul 4, 2017 at 08:18 AM
Hello,
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
See more 

11 replies

Zohaib R
Posts
2421
Registration date
Sunday September 23, 2012
Last seen
July 16, 2018
- Mar 11, 2013 at 02:36 PM
0
Thank you
Hi Tom9o,

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:

=IF(ISBLANK(A1),"",IF(B1=A1,A1,""))

Do reply with results.
amazing thanks solved my problem :)
Tom9o
Posts
11
Registration date
Monday February 18, 2013
Last seen
September 15, 2013
- Mar 12, 2013 at 05:24 AM
0
Thank you
Thanks Zohaib R,

It works a treat,

Tom9o
Tom9o
Posts
11
Registration date
Monday February 18, 2013
Last seen
September 15, 2013
- Mar 12, 2013 at 07:48 AM
0
Thank you
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

Hope this makes sence
Zohaib R
Posts
2421
Registration date
Sunday September 23, 2012
Last seen
July 16, 2018
- Mar 12, 2013 at 01:56 PM
0
Thank you
Hi Tom9o,

I think my previous post was not clear. I have applied the formula in a sheet have uploaded it to the below mentioned link:

http://speedy.sh/XTzvT/DateMatch.xlsx

Please download the file and check if this resolves your query.

Do reply with results.
0
Thank you
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.

Thanks again for your help.Tom9o
Zohaib R
Posts
2421
Registration date
Sunday September 23, 2012
Last seen
July 16, 2018
- Mar 22, 2013 at 06:21 PM
0
Thank you
Hi Tom9o,

I would like to know what error (such as #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!) you receive in cell. Or, it simply displays as blank?

Please do write back to us.
0
Thank you
Hi Zohaib R,

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.

Tom
Zohaib R
Posts
2421
Registration date
Sunday September 23, 2012
Last seen
July 16, 2018
- Mar 22, 2013 at 08:40 PM
0
Thank you
Hi Tom,

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:

http://www.speedyshare.com/
0
Thank you
Hi Zohaib R,

I have uplaoded as requested did it twice as not sure if it worked first time, please let me know it you did not receive it,

Thanks Tom9o
Zohaib R
Posts
2421
Registration date
Sunday September 23, 2012
Last seen
July 16, 2018
- Mar 26, 2013 at 04:40 PM
0
Thank you
Hi Tom,

After you upload a file on http://www.speedyshare.com/, it becomes a link. Please check the below mentioned image:

http://s23.postimg.org/p05ed6vfv/Date_Match.jpg

Copy the first link and add it to your reply.