Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Steve
 
Posts: n/a
Default Counting blanks, either 1, 2 or 3

I'm counting blank cells with this formula:
=COUNTIF(Y3:Y223,"")

In column X, I have this formula =LEFT(S74,1), which results in either a
1, 2 or 3

How could I count the blank cells that correspond with the 1's, the 2's &
the 3's ?

Thanks,

Steve
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John Michl
 
Posts: n/a
Default Counting blanks, either 1, 2 or 3

Steve -
You can use the SUMPRODUCT function to do a multi-criteria count. The
trick is when you use the LEFT function, the result is a text string so
you must convert the numerical criteria to text.
Assuming original "numbers" are in column S, the resulting leading
numbers (as text) are in column X and the other criteria in Y....

=SUMPRODUCT(--(X1:X100="1"),--(ISBLANK(Y1:Y100))

To avoid the "1" business, change your formula in column X to
=VALUE(LEFT(S74,1)) to create a number value instead of a text value.

You might consider this variation to eliminate the need for column X...

=SUMPRODUCT(--(LEFT(S1:S100,1)="1"),--(ISBLANK(Y1:Y100)))


- John Michl

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Counting blanks, either 1, 2 or 3

Hi!

Try this:

=SUMPRODUCT(--(A1:A10=""),--(ISNUMBER(MATCH(B1:B10,{1,2,3},0))))

Biff

"Steve" wrote in message
...
I'm counting blank cells with this formula:
=COUNTIF(Y3:Y223,"")

In column X, I have this formula =LEFT(S74,1), which results in either a
1, 2 or 3

How could I count the blank cells that correspond with the 1's, the 2's &
the 3's ?

Thanks,

Steve



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Counting blanks, either 1, 2 or 3

Ooops!

I forgot about the LEFT function returning TEXT as John noted.

You can either use the Sumproduct formula as is and change your LEFT formula
to:

=LEFT(cell_ref)*1

Or

=--LEFT(cell_ref)

These will convert the TEXT numbers to NUMERIC numbers.

Or, just change the Sumproduct formula by enclosing the array constants in
quotes:

=SUMPRODUCT(--(A1:A10=""),--(ISNUMBER(MATCH(B1:B10,{"1","2","3"},0))))

In general, it's not a good idea to have formulas returning TEXT numbers.

Biff

"Biff" wrote in message
...
Hi!

Try this:

=SUMPRODUCT(--(A1:A10=""),--(ISNUMBER(MATCH(B1:B10,{1,2,3},0))))

Biff

"Steve" wrote in message
...
I'm counting blank cells with this formula:
=COUNTIF(Y3:Y223,"")

In column X, I have this formula =LEFT(S74,1), which results in either
a
1, 2 or 3

How could I count the blank cells that correspond with the 1's, the 2's &
the 3's ?

Thanks,

Steve





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Steve
 
Posts: n/a
Default Counting blanks, either 1, 2 or 3

Thanks guys,

Everything worked very nicely. Much appreciated.

Thanks again,

Steve

"Steve" wrote:

I'm counting blank cells with this formula:
=COUNTIF(Y3:Y223,"")

In column X, I have this formula =LEFT(S74,1), which results in either a
1, 2 or 3

How could I count the blank cells that correspond with the 1's, the 2's &
the 3's ?

Thanks,

Steve



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur
 
Posts: n/a
Default Counting blanks, either 1, 2 or 3

Hi,

You may want to try the following array formula (Ctrl+Shift+Enter):

=count(if(((range=1)+(range=2)+(range=3)*(range2=" ")),range2))

Regards,

Ashish Mathur

"Steve" wrote:

I'm counting blank cells with this formula:
=COUNTIF(Y3:Y223,"")

In column X, I have this formula =LEFT(S74,1), which results in either a
1, 2 or 3

How could I count the blank cells that correspond with the 1's, the 2's &
the 3's ?

Thanks,

Steve

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
Data Validation and Blanks in List GoneRural Excel Worksheet Functions 1 October 26th 05 05:03 PM
Counting Blanks T De Villiers Excel Worksheet Functions 2 August 23rd 05 02:34 PM
If Then, not using values, or not counting blanks Need Help 123 Excel Worksheet Functions 8 July 20th 05 06:23 PM
Counting rows of blanks across certain columns crossingboston New Users to Excel 1 May 26th 05 05:20 PM
linking files with blanks muscogee Excel Discussion (Misc queries) 0 March 17th 05 07:13 PM


All times are GMT +1. The time now is 10:15 PM.

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

About Us

"It's about Microsoft Excel"