Solved If cells contain text

May 27, 2016 at 07:13:09
Specs: Windows 7
What is the formula for 'if a range of cells contain any text then return ...
I have several columns of information and if there is any text in 3 particular columns then I want to see the information in the column containing the revenue

See More: If cells contain text

Report •


#1
May 27, 2016 at 09:08:41
Does this work for you?

=IF(COUNTIF(A1:C1,"*"),Revenue_Cell_Reference,"")

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

message edited by DerbyDad03


Report •

#2
May 27, 2016 at 09:41:30
✔ Best Answer
Minor correction to DerbyDad's formula:

=IF(COUNTIF(A1:C1,"*"),"Revenue_Cell_Reference","")

Note the quote marks around Revenue_Cell_Reference

See Reply # 4 for more info.


MIKE

http://www.skeptic.com/

message edited by mmcconaghy


Report •

#3
May 27, 2016 at 10:28:08
Another option, is to use Conditional Formatting
With CF you can change the color of the cell that contains text.

Conditional Formatting 2007

1) Select your cell or range of cells, IE A1:C100
2) On the ribbon click Conditional Formatting
3) Click on New Rules, it’s near the bottom of the dialog box.
4) Click Use A Formula to determine which cells to format.
5) Enter the formula:

=ISTEXT(A1)

6) Click on the Format button
7) Select the Fill Tab
8) Select a pretty color
9) Click OK
10) Click OK


See how that works for you.

MIKE

http://www.skeptic.com/


Report •

Related Solutions

#4
May 27, 2016 at 11:41:48
Mike,

I was not trying return the text "Revenue_Cell_Reference", I was trying to indicate that the value_if_true argument should be a reference to the revenue cell that he wants to return.

In addition, no quotes are required if the text is a reference to a Named Range, which is actually how I tested the formula.

I have added italics to hopefully make it clearer.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

message edited by DerbyDad03


Report •

#5
May 27, 2016 at 12:03:41
DerbyDad03

I kind of thought it was something along those lines, but wasn't completely sure.
I have edited my post.

MIKE

http://www.skeptic.com/


Report •

#6
May 27, 2016 at 14:56:09
No problem...I could have been clearer. I was rushing.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •


Ask Question