#1   Report Post  
Posted to microsoft.public.excel.misc
Jim Jim is offline
external usenet poster
 
Posts: 615
Default If Then

How do I write a formula that will return an x if a range of cells have any
data?

For example I would like A1 to return X, if any of the cells in B1 through
P1 have any data in them.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default If Then

Enter this in A1
=IF(CountA(B1:P1)0,"X","")

"Jim" wrote:

How do I write a formula that will return an x if a range of cells have any
data?

For example I would like A1 to return X, if any of the cells in B1 through
P1 have any data in them.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default If Then

Another possibility...

=LEFT("X",COUNTA(B1:P1)0)

--
Rick (MVP - Excel)


"Jim" wrote in message
...
How do I write a formula that will return an x if a range of cells have
any
data?

For example I would like A1 to return X, if any of the cells in B1 through
P1 have any data in them.

Thanks


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"