Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default IF Statement for Cells in a Range

I have a spreadsheet that's 20 columns wide. I make entries under each
heading dependiing upon the relationship of the heading topic and the data in
column A. But there are times when no data is entered and B:U is completely
unpopulated. I would like to write an if statement that says IF(B:U has no
entries, "value1", "value2").

I just don't know the term to use for "if the range is completely unpopulated"

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default IF Statement for Cells in a Range

=IF(COUNTA(B:U)=0,"value1","value2")

--
Gary''s Student - gsnu200811
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default IF Statement for Cells in a Range

Hi,

You didn't say what you put in the range so this checks for text and numbers

=IF(AND(COUNT(B2:U14)=0,COUNTA(B2:U14)=0),"Its Empty","We got data")

Mike

"Confused_in_Houston" wrote:

I have a spreadsheet that's 20 columns wide. I make entries under each
heading dependiing upon the relationship of the heading topic and the data in
column A. But there are times when no data is entered and B:U is completely
unpopulated. I would like to write an if statement that says IF(B:U has no
entries, "value1", "value2").

I just don't know the term to use for "if the range is completely unpopulated"

Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default IF Statement for Cells in a Range

Hmm,

No need for the count bit.

Mike

"Mike H" wrote:

Hi,

You didn't say what you put in the range so this checks for text and numbers

=IF(AND(COUNT(B2:U14)=0,COUNTA(B2:U14)=0),"Its Empty","We got data")

Mike

"Confused_in_Houston" wrote:

I have a spreadsheet that's 20 columns wide. I make entries under each
heading dependiing upon the relationship of the heading topic and the data in
column A. But there are times when no data is entered and B:U is completely
unpopulated. I would like to write an if statement that says IF(B:U has no
entries, "value1", "value2").

I just don't know the term to use for "if the range is completely unpopulated"

Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default IF Statement for Cells in a Range

Some cells have numbers, some have text. I'm sorry what does it mean to
forget the count bit? How does that impact the formula in your previous post?

Thanks

"Mike H" wrote:

Hmm,

No need for the count bit.

Mike

"Mike H" wrote:

Hi,

You didn't say what you put in the range so this checks for text and numbers

=IF(AND(COUNT(B2:U14)=0,COUNTA(B2:U14)=0),"Its Empty","We got data")

Mike

"Confused_in_Houston" wrote:

I have a spreadsheet that's 20 columns wide. I make entries under each
heading dependiing upon the relationship of the heading topic and the data in
column A. But there are times when no data is entered and B:U is completely
unpopulated. I would like to write an if statement that says IF(B:U has no
entries, "value1", "value2").

I just don't know the term to use for "if the range is completely unpopulated"

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF statement with range JN Excel Worksheet Functions 3 August 27th 07 06:08 PM
IF STATEMENT Range Bee Excel Discussion (Misc queries) 5 July 30th 07 12:33 AM
range in an IF statement Dorothy J Excel Worksheet Functions 9 January 12th 07 07:44 PM
Using variables as first and last cells in range statement Tom from Ga Excel Worksheet Functions 2 February 6th 06 09:08 PM
Use a range name in VB with IF Then Else statement spydor Excel Discussion (Misc queries) 1 January 6th 06 01:20 AM


All times are GMT +1. The time now is 12: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"