If date exists (or any value) in B2, return value of 1 to C2 [Closed]

Report
-
 T -
Hello,

If for example there is a value of a date in column B (Row b2 or other) I need it to return a value of 1 in column C (C2 and corresponding) to allow me to count how many times in a month a certain account was called/visited

Any easy solution?


1 reply

Posts
2368
Registration date
Sunday September 23, 2012
Status
Moderator
Last seen
December 13, 2018
30
Hello T,

Please put the below mentioned formula in C2 and drag the formula in the entire Column C:

=IF(ISBLANK(B2),"",1)

In case, you want to have a zero (0) instead of blank then you can replace "" with 0 in the formula.

Hope this helps.

Please do write back to us.
1
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

Omg! Thank you Zohaib R!

Sorry for the late reply! I just noticed the response. That absolutely worked! Now if there is a value it shows 1, and if its blank it shows 0

If you have any extra time, can you help me understand what each of the values is doing in your formula? So I can understand the logic?

=IF(ISBLANK(B2),"",1)

Just so I can make logical sense of it and use it for other applications:
The formula is saying, if cell B2 is blank, then the value in "" should be in cell c2, and if its not blank, use the value after the comma? so return 1?

Someone explained to me in Vlookup's that the formula argument ends with ,0) to tell excel to finish, but it seems in this formula you ended with ,1) so it intrigued me to ask the question
Also if I could expand the question further

Is it possible if Cell B2 and cell C2 both had values of dates or anything else, that D2 would add 1+1 to equal 2?

To add context, i track weekly activity, so if it shows up on week 1 and week 3, i would love a column to say it was visited 2 times within in the month because its adding 1+1
--If visited in week 1, 2 & 3 .column D2 should say visited 3 times

Hope that's not too difficult!

Thank you again
-T

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!