Report

If a cell contains any text then add a value [Solved/Closed]

Ask a question cbrizz - Last answered on Jul 3, 2017 at 08:31 PM by Abby
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.
Helpful
+68
plus moins
quote
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.
quote
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,"")
Was this answer helpful?  
Huwbacca- Oct 30, 2015 at 05:15 AM
it can be more elegant as just =IF(B1=FALSE,C1+1,"") or along those lines.

logic statements will return 1 if string is present or 0 if the cell is empty.
Killajdotwizzle- Feb 23, 2017 at 10:06 AM
You Use ISTEXT command
for example

You use =IF(ISTEXT(B1), 1,"")
Reply
Helpful
+1
plus moins
I used this formula to return a Day/Night value based on a time value added in an adjacent cell. When no time value is entered in the "C" column, the "G"column cell will display blank.

FORMULA IS ENTERED IN CELL "G1":

=IF(C1<>"",LOOKUP(HOUR(C1),{0;6;18;23},{"Night";"Day";"Night";"Night"}),"")
jessie- Apr 4, 2017 at 01:12 AM
I need a formula that says:

If cell contains any date for cell1- Pick up date or cell2- Delivery date then it is "served" if none "pending"
Reply

Member requests are more likely to be responded to.

Members can monitor the statuses of their requests from their account pages.

A CCM membership gives you access to additional options.

Not a member yet?

Sign up now. It takes less than a minute and is completely free!