LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default complex count formulas using multiple criteria in different ranges

I am trying to calculate a count, if a range of cells meets multiple
criteria. This formula is in an existing worksheet that I inherited and it
works as it currently exists to give me the count of items that meet the
criteria of being both (1) account type # in cell range $U= "50000" and the
value in Cell range $X is a value (ie is not blank or negative). See formula
below plus an explanation of my problem.

{=SUM(IF('Repo Data'!$X$2:$X$4938=0,IF('Repo
Data'!$U$2:$U$4938="50000",1)))+SUM(IF('Repo Data'!$X$2:$X$49380,IF('Repo
Data'!$U$2:$U$4938="50000",1)))-SUM(IF('Repo Data'!$X$2:$X$4938="",IF('Repo
Data'!$U$2:$U$4938="50000",1)))}

However, I am trying to modify it using different criteria (Legal entity) in
cell range $AH instead of (account type) in cell range $U.......
but when I try to edit the formula to replace the "50000" with another value
or a cell reference, (and change the column reference range accordingly) it
doesn't work, and the {} brackets on either end of the formula go away....I
have never seen these brackets used this way, and don't know why they are on
the formula, but they seem to make a diff.

any thoughts on this above problem?

....also as an alternative I tried the below

=SUM(IF(AND('Repo Data'!$O$2:$O$4938=0.01,'Repo
Data'!$AH$2:$AH$4938=C5),1)) Doesn't work

=SUM(IF(AND('Repo Data'!$O$2:$O$4938=0.01,'Repo
Data'!$AH$2:$AH$4938="HAF"),1)) Doesn't work

the below alternative formula works, but seems like such a roundabout way to
get the answer....and I had to put in the -0.01 and the <=60000 as place
holders as the values I want should be positive and would never be greater
than 30,000 but I used 60,000 just to be sure. I tried using 0.00 but that
didn't work...it needed the -0.01 to work.

=SUMPRODUCT(--('Repo Data'!$O$2:$O$4938-0.01),--('Repo
Data'!$O$2:$O$4938<=60000),--('Repo Data'!$AH$2:$AH$4938=C5))

any insight you can provide would be appreciated

 
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
SUMIF Multiple Criteria in different ranges. [email protected] Excel Worksheet Functions 13 February 6th 08 05:53 PM
multiple ranges & criteria for SUM-IF challenge akumudzi Excel Discussion (Misc queries) 4 June 25th 07 10:18 PM
Count Filtered Visible Items that Match Numeric Criteria between two ranges Sam via OfficeKB.com Excel Worksheet Functions 4 September 20th 06 06:39 PM
Count rows that match criteria in 2 different column cell ranges JoAnn New Users to Excel 2 December 9th 05 05:51 PM
Count using complex criteria Rob Excel Worksheet Functions 2 May 4th 05 02:34 PM


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