If a cell contains any text then add a value

Solved
cbrizz - Updated on Jul 19, 2017 at 05:59 AM
 Pharmanumbers - Jun 5, 2019 at 02:02 PM
I hope someone can help me with this...I've done this before but can't remember how.

I have a list of names (for an attendees list) and I need to show an extended total for each
person and the number of guests they will bring. Here's the layout...

B2 is the person's name
C2 is the number of guests they will bring
D2 is the total for that person (including them)

I need a formula that says: If B2 has any text, then add a value of "1" to C2 and enter the total in D2.

Hope that makes sense. Thank you in advance for helping.
Related:

2 replies

venkat1926
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
810
Updated on Nov 27, 2018 at 04:13 AM
I need a formula that says: If B2 has any text, then add a value of "1" to C2 and enter the total in D2. 


why not just the condition that if B2 is not blank

then D2 will have
=if(B2<>"",c2+1,"")


if you insist on condition that if B2 is text then the fomula in D2 is
=if(istext(B2),c2+1,"")
89
Slightly complicated considering the subject matter..

If there is no Attendee, then there is no guests.. so C2 is always '+1'
0
issahamameh
Posts
22
Registration date
Friday October 19, 2012
Status
Member
Last seen
June 22, 2013

Mar 18, 2013 at 02:16 PM
Please try this one: (Copy and paste it)
=IF(B2="","",(1+C2))
0
If you have occasional values in one cell, followed by differing blank cells below it until another value, insert a new column next to it and use this forumla: =IF(A1<>"",A1,0) for the top cell, followed by =IF(A2<>"",A2,B1) for all the remaining cells.
0
Thanks issahamameh!!
0
None of this has worked for me. Something like =IF(B2="","",(1+C2)) only makes the cell with the formula equals to C2+1. It doesn't add 1 to C2
0