A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

vlookup count?



 
 
Thread Tools Display Modes
  #1  
Old May 21st, 2009, 10:57 AM posted to microsoft.public.excel.worksheet.functions
Fluke[_2_]
external usenet poster
 
Posts: 25
Default vlookup count?

Hi. I am building a report sheet that looks at other workbooks for
information and gives statistics. The other workbooks are exports from an
Oracle database.

In the exported sheets, I need to check that the first column = "IWS", the
second column - a date cell - is between two dates (normally the previous
month, and the third column says "Approved", and count the rows that fall
into this category.. There's other bits to take into account in the other
workbooks, like it being Complete rather than Approved, and if it's overdue
or due within 30 days of being requested, but if I can get this formula setup
correctly I can hopefully figure the rest.

Any help is very much appreciated. I don't mind if I need more than one
formula working on each other to give me the count as they can be on hidden
sheets in the Report worksheet and I can make a front sheet that has all the
count values.
  #2  
Old May 21st, 2009, 04:02 PM posted to microsoft.public.excel.worksheet.functions
Sean Timmons
external usenet poster
 
Posts: 1,722
Default vlookup count?

What you are looking for is SUMPRODUCT...

=SUMPRODUCT(--($A$2:$A$10000="AWS"),--($B$2:$B$10000=From
Date),--($B$2:$B$10000=To Date),--($C$2:$C$10000="Approved"))

Couple things to note...

You MUST select a range.. 2 - 10000 in the above. It will not work if you do
A:A...

All ranges must be the same size.. can't look at 2 - 500 in one of them...

the -- before the ( means return a 0 or 1 for each row I'm looking at, with
1 meaning it meets, 0 meaning it does not.

So.. for every cell that meets all of the above, the result is 1*1*1*1, or, 1.

So, the result will be the count of rows that meet the above.

If you wanted to get a sum, let's say, total Revenue for that, you would not
include the -- for the summed field. Thsi way, you'd have, say, 1*1*1*1*500,
or 500!

Then it would be like a sumif rather than a countif.

"Fluke" wrote:

Hi. I am building a report sheet that looks at other workbooks for
information and gives statistics. The other workbooks are exports from an
Oracle database.

In the exported sheets, I need to check that the first column = "IWS", the
second column - a date cell - is between two dates (normally the previous
month, and the third column says "Approved", and count the rows that fall
into this category.. There's other bits to take into account in the other
workbooks, like it being Complete rather than Approved, and if it's overdue
or due within 30 days of being requested, but if I can get this formula setup
correctly I can hopefully figure the rest.

Any help is very much appreciated. I don't mind if I need more than one
formula working on each other to give me the count as they can be on hidden
sheets in the Report worksheet and I can make a front sheet that has all the
count values.

  #3  
Old May 21st, 2009, 04:29 PM posted to microsoft.public.excel.worksheet.functions
Fluke[_2_]
external usenet poster
 
Posts: 25
Default vlookup count?

Worked perfectly. Thank you!!

"Sean Timmons" wrote:

What you are looking for is SUMPRODUCT...

=SUMPRODUCT(--($A$2:$A$10000="AWS"),--($B$2:$B$10000=From
Date),--($B$2:$B$10000=To Date),--($C$2:$C$10000="Approved"))

Couple things to note...

You MUST select a range.. 2 - 10000 in the above. It will not work if you do
A:A...

All ranges must be the same size.. can't look at 2 - 500 in one of them...

the -- before the ( means return a 0 or 1 for each row I'm looking at, with
1 meaning it meets, 0 meaning it does not.

So.. for every cell that meets all of the above, the result is 1*1*1*1, or, 1.

So, the result will be the count of rows that meet the above.

If you wanted to get a sum, let's say, total Revenue for that, you would not
include the -- for the summed field. Thsi way, you'd have, say, 1*1*1*1*500,
or 500!

Then it would be like a sumif rather than a countif.

"Fluke" wrote:

Hi. I am building a report sheet that looks at other workbooks for
information and gives statistics. The other workbooks are exports from an
Oracle database.

In the exported sheets, I need to check that the first column = "IWS", the
second column - a date cell - is between two dates (normally the previous
month, and the third column says "Approved", and count the rows that fall
into this category.. There's other bits to take into account in the other
workbooks, like it being Complete rather than Approved, and if it's overdue
or due within 30 days of being requested, but if I can get this formula setup
correctly I can hopefully figure the rest.

Any help is very much appreciated. I don't mind if I need more than one
formula working on each other to give me the count as they can be on hidden
sheets in the Report worksheet and I can make a front sheet that has all the
count values.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:54 PM.


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