Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Min/Max with IF(?) criteria

I have two columns. A contains numbers, B contains text days of week (Mon,
Tue, etc.) starting from 01/01/07. How do I write a formula that will give
me the Min in column A based on the day of the week, discounting any days
where the the number in A is zero (presumably the same formula will work for
Max).

Thanks,

Ron R.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Min/Max with IF(?) criteria

=MIN(IF(A1:A100<0)*(B1:B100="Mon"),A1:A100))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"ronnomad" wrote in message
...
I have two columns. A contains numbers, B contains text days of week (Mon,
Tue, etc.) starting from 01/01/07. How do I write a formula that will
give
me the Min in column A based on the day of the week, discounting any days
where the the number in A is zero (presumably the same formula will work
for
Max).

Thanks,

Ron R.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Min/Max with IF(?) criteria

Bob,

Tried the formula but kept getting a formula error message pointing to the
zero. Any suggestions?

"Bob Phillips" wrote:

=MIN(IF(A1:A100<0)*(B1:B100="Mon"),A1:A100))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"ronnomad" wrote in message
...
I have two columns. A contains numbers, B contains text days of week (Mon,
Tue, etc.) starting from 01/01/07. How do I write a formula that will
give
me the Min in column A based on the day of the week, discounting any days
where the the number in A is zero (presumably the same formula will work
for
Max).

Thanks,

Ron R.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Min/Max with IF(?) criteria

Ron,

Array enter formulas like this, using Ctrl-Shift-Enter:

=MIN(IF(TEXT(A2:A100,"ddd")="Tue",IF(B2:B100<0,B2 :B100)))
=MAX(IF(TEXT(A2:A100,"ddd")="Tue",IF(B2:B100<0,B2 :B100)))

You could also use WEEKDAY, but I find this easier to understand....

HTH,
Bernie
MS Excel MVP


"ronnomad" wrote in message
...
I have two columns. A contains numbers, B contains text days of week (Mon,
Tue, etc.) starting from 01/01/07. How do I write a formula that will give
me the Min in column A based on the day of the week, discounting any days
where the the number in A is zero (presumably the same formula will work for
Max).

Thanks,

Ron R.





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Min/Max with IF(?) criteria

Thanks Bernie. Works perfectly.

"Bernie Deitrick" wrote:

Ron,

Array enter formulas like this, using Ctrl-Shift-Enter:

=MIN(IF(TEXT(A2:A100,"ddd")="Tue",IF(B2:B100<0,B2 :B100)))
=MAX(IF(TEXT(A2:A100,"ddd")="Tue",IF(B2:B100<0,B2 :B100)))

You could also use WEEKDAY, but I find this easier to understand....

HTH,
Bernie
MS Excel MVP


"ronnomad" wrote in message
...
I have two columns. A contains numbers, B contains text days of week (Mon,
Tue, etc.) starting from 01/01/07. How do I write a formula that will give
me the Min in column A based on the day of the week, discounting any days
where the the number in A is zero (presumably the same formula will work for
Max).

Thanks,

Ron R.




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
criteria 1(a,b,c), criteria 2 (T,F) - Results (3 answers) achievab Kikkoman Excel Discussion (Misc queries) 5 July 1st 05 11:05 PM
Countif using format criteria not number criteria? Rumbla76 Excel Worksheet Functions 1 April 20th 05 05:38 AM
Countif using format criteria....not number criteria? Troy Excel Worksheet Functions 1 April 20th 05 04:50 AM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Saleem Excel Worksheet Functions 1 January 12th 05 10:54 AM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Arain Excel Worksheet Functions 1 January 12th 05 08:33 AM


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