Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default if search formula incl date range

I need to write a formula to do the following and it's just feeling way over
my head. I know I need an "if" at the beginning but then I get lost. Can
anyone help?

Col A Col B Col C Col D
Date $Amt Type Text Code

If the type in row 1 = X, find the minimum $Amt from all the rows where
Type=Y or Z, AND Date is within 30 days of the Date in row 1.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default if search formula incl date range

Oops - forgot a criteria:

If the type in row 1 = X, find the minimum $Amt from all the rows where
Type=Y or Z, AND Date is within 30 days of the Date in row 1, ONLY SEARCHING
the rows where the Text Code is equal to the Text Code in row 1.

"Laury" wrote:

I need to write a formula to do the following and it's just feeling way over
my head. I know I need an "if" at the beginning but then I get lost. Can
anyone help?

Col A Col B Col C Col D
Date $Amt Type Text Code

If the type in row 1 = X, find the minimum $Amt from all the rows where
Type=Y or Z, AND Date is within 30 days of the Date in row 1.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default if search formula incl date range

What I have working so far:
=IF(C2="MCD",MIN(IF($D$2:$D$13="1001",$B$2:$B$13)) ," ")

When I try to add an AND statement to make the min calculate on rows that
meet 2 criteria, it's not working:
=IF(C4="MCD",MIN(IF(AND($D$2:$D$13="1001",$C$2:$C$ 13="Private"),$B$2:$B$13))," ")

"Laury" wrote:

Oops - forgot a criteria:

If the type in row 1 = X, find the minimum $Amt from all the rows where
Type=Y or Z, AND Date is within 30 days of the Date in row 1, ONLY SEARCHING
the rows where the Text Code is equal to the Text Code in row 1.

"Laury" wrote:

I need to write a formula to do the following and it's just feeling way over
my head. I know I need an "if" at the beginning but then I get lost. Can
anyone help?

Col A Col B Col C Col D
Date $Amt Type Text Code

If the type in row 1 = X, find the minimum $Amt from all the rows where
Type=Y or Z, AND Date is within 30 days of the Date in row 1.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default if search formula incl date range

Almost there but still need help on the date range part:
=IF(C2="MCD",MIN(IF(($D$2:$D$13="1001")*($C$2:$C$1 3<"MCD"),$B$2:$B$13))," ")

How do I add in a 3rd criteria that says pick the min amount that meets the
1st two criteria AND is within 30 days (before or after) the date on row 1?

"Laury" wrote:

What I have working so far:
=IF(C2="MCD",MIN(IF($D$2:$D$13="1001",$B$2:$B$13)) ," ")

When I try to add an AND statement to make the min calculate on rows that
meet 2 criteria, it's not working:
=IF(C4="MCD",MIN(IF(AND($D$2:$D$13="1001",$C$2:$C$ 13="Private"),$B$2:$B$13))," ")

"Laury" wrote:

Oops - forgot a criteria:

If the type in row 1 = X, find the minimum $Amt from all the rows where
Type=Y or Z, AND Date is within 30 days of the Date in row 1, ONLY SEARCHING
the rows where the Text Code is equal to the Text Code in row 1.

"Laury" wrote:

I need to write a formula to do the following and it's just feeling way over
my head. I know I need an "if" at the beginning but then I get lost. Can
anyone help?

Col A Col B Col C Col D
Date $Amt Type Text Code

If the type in row 1 = X, find the minimum $Amt from all the rows where
Type=Y or Z, AND Date is within 30 days of the Date in row 1.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default if search formula incl date range

I got it working but thanks!

=IF(C2="MCD",MIN(IF(($D$2:$D$13=D2)*((A2-($A$2:$A$13))<31)*($C$2:$C$13<"MCD"),IF(($D$2:$D$ 13=D2)*((($A$2:$A$13)-A2)<31)*($C$2:$C$13<"MCD"),$B$2:$B$13,"
")," "))," ")

"Laury" wrote:

What I have working so far:
=IF(C2="MCD",MIN(IF($D$2:$D$13="1001",$B$2:$B$13)) ," ")

When I try to add an AND statement to make the min calculate on rows that
meet 2 criteria, it's not working:
=IF(C4="MCD",MIN(IF(AND($D$2:$D$13="1001",$C$2:$C$ 13="Private"),$B$2:$B$13))," ")

"Laury" wrote:

Oops - forgot a criteria:

If the type in row 1 = X, find the minimum $Amt from all the rows where
Type=Y or Z, AND Date is within 30 days of the Date in row 1, ONLY SEARCHING
the rows where the Text Code is equal to the Text Code in row 1.

"Laury" wrote:

I need to write a formula to do the following and it's just feeling way over
my head. I know I need an "if" at the beginning but then I get lost. Can
anyone help?

Col A Col B Col C Col D
Date $Amt Type Text Code

If the type in row 1 = X, find the minimum $Amt from all the rows where
Type=Y or Z, AND Date is within 30 days of the Date in row 1.

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
Create a formula in a date range to locate a specific date - ecel util Excel Discussion (Misc queries) 0 February 19th 07 03:03 PM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Worksheet Functions 2 April 21st 06 02:50 AM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Discussion (Misc queries) 1 April 20th 06 10:03 PM
If formula for date range rediproof Excel Discussion (Misc queries) 9 May 28th 05 04:59 AM
how do i use the sum if formula with a date range? zach f Excel Worksheet Functions 10 November 12th 04 01:34 AM


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

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"