Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / October 2007

Tip: Looking for answers? Try searching our database.

Determine if a range has text

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Regis - 31 Oct 2007 02:00 GMT
How can I put "Has text" into cell A1 if a range of cells (say B1:B5)
contain any text?
Dave Peterson - 31 Oct 2007 02:24 GMT
If you want to determine if any of those cells has anything in it (text,
numbers, formulas), you can use:

=counta(b1:b5)>0
or
=if(counta(b1:b5)>0,"something there","it's all empty")

> How can I put "Has text" into cell A1 if a range of cells (say B1:B5)
> contain any text?

Signature

Dave Peterson

JP - 31 Oct 2007 02:40 GMT
How about

=IF(SUM(IF(ISTEXT(B1:B5),1,0)),"Has text","NO TEXT")

Ctrl-Shift-Enter as an array formula

> If you want to determine if any of those cells has anything in it (text,
> numbers, formulas), you can use:
[quoted text clipped - 9 lines]
>
> Dave Peterson
Dave Peterson - 31 Oct 2007 04:07 GMT
Alternatively, to count the cells with text:

=SUMPRODUCT(--(ISTEXT(B1:B5)))
or
=if(SUMPRODUCT(--(ISTEXT(B1:B5)))>0,"has text","no text")
(without the array formula)

or
=IF(OR(ISTEXT(B1:B5)),"has text","no text")
as an array formula.

> How about
>
[quoted text clipped - 15 lines]
> >
> > Dave Peterson

Signature

Dave Peterson

Regis - 31 Oct 2007 04:32 GMT
JP <jpena@sterlingtesting.com> wrote in news:1193794831.444658.229980
@d55g2000hsg.googlegroups.com:

> =IF(SUM(IF(ISTEXT(B1:B5),1,0)),"Has text","NO TEXT")

-----
I believe ISTEXT works on only the first cell (B1), right? There are issues  
with COUNT and COUNTA where both text and numbers are in B1:B5.

What I'm after is preventing text being put into the cells. Only numbers  
should be in B1:B5. If text is put in A1 should light up.
MartinW - 31 Oct 2007 08:45 GMT
Hi Regis,

Maybe this,

Type Has Text in A1, then set the font color to white to hide the text.
Then set conditional formatting in A1 with Formula is  =OR(ISTEXT(B1:B5))
Click the format button and set the font color to black and OK out.

HTH
Martin

> JP <jpena@sterlingtesting.com> wrote in news:1193794831.444658.229980
> @d55g2000hsg.googlegroups.com:
[quoted text clipped - 8 lines]
> What I'm after is preventing text being put into the cells. Only numbers
> should be in B1:B5. If text is put in A1 should light up.
Dave Peterson - 31 Oct 2007 13:24 GMT
Make sure you array enter that formula (ctrl-shift-enter).

And if you highlight istext(b1:b5) in the formula bar, then hit F9, you'll see
an array of true/falses.

Hit escape to discard the last change (or ctrl-z) if you want the formula back.

> JP <jpena@sterlingtesting.com> wrote in news:1193794831.444658.229980
> @d55g2000hsg.googlegroups.com:
[quoted text clipped - 7 lines]
> What I'm after is preventing text being put into the cells. Only numbers
> should be in B1:B5. If text is put in A1 should light up.

Signature

Dave Peterson

Jim - 01 Nov 2007 00:38 GMT
if you're just out to prevent text entries in specific cells, could you use
data validation, custom, with a formula like =isnumber(a1)?

jim

> JP <jpena@sterlingtesting.com> wrote in news:1193794831.444658.229980
> @d55g2000hsg.googlegroups.com:
[quoted text clipped - 8 lines]
> What I'm after is preventing text being put into the cells. Only numbers
> should be in B1:B5. If text is put in A1 should light up.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.