Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Sumif criteria appears twice

How would one set up a formula for:
Range B1:B20 is text and is sometimes duplicated, range A1:A20 has amounts.
If duplicated I need the amount of the later dated one to be the formula
result.

Thanks for your time.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Sumif criteria appears twice

Where are the dates?

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
How would one set up a formula for:
Range B1:B20 is text and is sometimes duplicated, range A1:A20 has
amounts.
If duplicated I need the amount of the later dated one to be the formula
result.

Thanks for your time.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Sumif criteria appears twice

The dates are in column M1:M20

"Peo Sjoblom" wrote:

Where are the dates?

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
How would one set up a formula for:
Range B1:B20 is text and is sometimes duplicated, range A1:A20 has
amounts.
If duplicated I need the amount of the later dated one to be the formula
result.

Thanks for your time.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Sumif criteria appears twice


=MAX(IF((B1:B20="x")*(M1:M20),A1:A20))


entered with ctrl + shift & enter



will return what's in A1:A20 where B1:B20 is x (replace x with your
criteria)

and if there are more than one occurrence of x it will return the one with
the
most recent/later date in M1:M20

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
The dates are in column M1:M20

"Peo Sjoblom" wrote:

Where are the dates?

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
How would one set up a formula for:
Range B1:B20 is text and is sometimes duplicated, range A1:A20 has
amounts.
If duplicated I need the amount of the later dated one to be the
formula
result.

Thanks for your time.






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Sumif criteria appears twice

Peo,

Thank you for the suggestion, but the formula below returns a value even if
the text occurs once. I am looking for a formula that will only return a
value if the text appears twice. Maybe I'm doing something wrong.

"Peo Sjoblom" wrote:


=MAX(IF((B1:B20="x")*(M1:M20),A1:A20))


entered with ctrl + shift & enter



will return what's in A1:A20 where B1:B20 is x (replace x with your
criteria)

and if there are more than one occurrence of x it will return the one with
the
most recent/later date in M1:M20

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
The dates are in column M1:M20

"Peo Sjoblom" wrote:

Where are the dates?

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
How would one set up a formula for:
Range B1:B20 is text and is sometimes duplicated, range A1:A20 has
amounts.
If duplicated I need the amount of the later dated one to be the
formula
result.

Thanks for your time.









  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Sumif criteria appears twice

You didn't say that in your original post

"If duplicated I need the amount of the later dated one to be the formula
result."

You didn't say that you didn't want any result at all if it only occurred
once


=IF(COUNTIF(B1:B20,"x")<2,"",MAX(IF((B1:B20="x")*( M1:M20),A1:A20)))

entered the same way will return blank if it occurs once




--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
Peo,

Thank you for the suggestion, but the formula below returns a value even
if
the text occurs once. I am looking for a formula that will only return a
value if the text appears twice. Maybe I'm doing something wrong.

"Peo Sjoblom" wrote:


=MAX(IF((B1:B20="x")*(M1:M20),A1:A20))


entered with ctrl + shift & enter



will return what's in A1:A20 where B1:B20 is x (replace x with your
criteria)

and if there are more than one occurrence of x it will return the one
with
the
most recent/later date in M1:M20

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
The dates are in column M1:M20

"Peo Sjoblom" wrote:

Where are the dates?

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
How would one set up a formula for:
Range B1:B20 is text and is sometimes duplicated, range A1:A20 has
amounts.
If duplicated I need the amount of the later dated one to be the
formula
result.

Thanks for your time.









  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Sumif criteria appears twice

Thanks for your help Peo, this did find the final result. I really appreciate
you time.

"Peo Sjoblom" wrote:

You didn't say that in your original post

"If duplicated I need the amount of the later dated one to be the formula
result."

You didn't say that you didn't want any result at all if it only occurred
once


=IF(COUNTIF(B1:B20,"x")<2,"",MAX(IF((B1:B20="x")*( M1:M20),A1:A20)))

entered the same way will return blank if it occurs once




--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
Peo,

Thank you for the suggestion, but the formula below returns a value even
if
the text occurs once. I am looking for a formula that will only return a
value if the text appears twice. Maybe I'm doing something wrong.

"Peo Sjoblom" wrote:


=MAX(IF((B1:B20="x")*(M1:M20),A1:A20))


entered with ctrl + shift & enter



will return what's in A1:A20 where B1:B20 is x (replace x with your
criteria)

and if there are more than one occurrence of x it will return the one
with
the
most recent/later date in M1:M20

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
The dates are in column M1:M20

"Peo Sjoblom" wrote:

Where are the dates?

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
How would one set up a formula for:
Range B1:B20 is text and is sometimes duplicated, range A1:A20 has
amounts.
If duplicated I need the amount of the later dated one to be the
formula
result.

Thanks for your time.










  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Sumif criteria appears twice

Hi,

I probably don't understand something on this one, but why don't you test
the previous formula by reversing the order of the two dates and see if it
still works. In other words if M5 has the earlier date and M15 the later
date, change the dates in M15 and M5 and see if the formula still returns the
correct value. If I read the formula correctly it is returning the Max value
in column A not the value for the Max date in column M.

If this is so, here is one solution:

=IF(COUNTIF(B1:B20,"x")<2,"",INDEX(A1:A20,MATCH(MA X((B1:B20="x")*(M1:M20)),M1:M20,0)))

--
Thanks,
Shane Devenshire


"vadda" wrote:

Thanks for your help Peo, this did find the final result. I really appreciate
you time.

"Peo Sjoblom" wrote:

You didn't say that in your original post

"If duplicated I need the amount of the later dated one to be the formula
result."

You didn't say that you didn't want any result at all if it only occurred
once


=IF(COUNTIF(B1:B20,"x")<2,"",MAX(IF((B1:B20="x")*( M1:M20),A1:A20)))

entered the same way will return blank if it occurs once




--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
Peo,

Thank you for the suggestion, but the formula below returns a value even
if
the text occurs once. I am looking for a formula that will only return a
value if the text appears twice. Maybe I'm doing something wrong.

"Peo Sjoblom" wrote:


=MAX(IF((B1:B20="x")*(M1:M20),A1:A20))


entered with ctrl + shift & enter



will return what's in A1:A20 where B1:B20 is x (replace x with your
criteria)

and if there are more than one occurrence of x it will return the one
with
the
most recent/later date in M1:M20

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
The dates are in column M1:M20

"Peo Sjoblom" wrote:

Where are the dates?

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
How would one set up a formula for:
Range B1:B20 is text and is sometimes duplicated, range A1:A20 has
amounts.
If duplicated I need the amount of the later dated one to be the
formula
result.

Thanks for your time.










  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Sumif criteria appears twice

You are right Shane, it was sloppy of me not testing the
values better.

--


Regards,


Peo Sjoblom

--


Regards,


Peo Sjoblom

"ShaneDevenshire" wrote in
message ...
Hi,

I probably don't understand something on this one, but why don't you test
the previous formula by reversing the order of the two dates and see if it
still works. In other words if M5 has the earlier date and M15 the later
date, change the dates in M15 and M5 and see if the formula still returns
the
correct value. If I read the formula correctly it is returning the Max
value
in column A not the value for the Max date in column M.

If this is so, here is one solution:

=IF(COUNTIF(B1:B20,"x")<2,"",INDEX(A1:A20,MATCH(MA X((B1:B20="x")*(M1:M20)),M1:M20,0)))

--
Thanks,
Shane Devenshire


"vadda" wrote:

Thanks for your help Peo, this did find the final result. I really
appreciate
you time.

"Peo Sjoblom" wrote:

You didn't say that in your original post

"If duplicated I need the amount of the later dated one to be the
formula
result."

You didn't say that you didn't want any result at all if it only
occurred
once


=IF(COUNTIF(B1:B20,"x")<2,"",MAX(IF((B1:B20="x")*( M1:M20),A1:A20)))

entered the same way will return blank if it occurs once




--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
Peo,

Thank you for the suggestion, but the formula below returns a value
even
if
the text occurs once. I am looking for a formula that will only
return a
value if the text appears twice. Maybe I'm doing something wrong.

"Peo Sjoblom" wrote:


=MAX(IF((B1:B20="x")*(M1:M20),A1:A20))


entered with ctrl + shift & enter



will return what's in A1:A20 where B1:B20 is x (replace x with your
criteria)

and if there are more than one occurrence of x it will return the
one
with
the
most recent/later date in M1:M20

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
The dates are in column M1:M20

"Peo Sjoblom" wrote:

Where are the dates?

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
How would one set up a formula for:
Range B1:B20 is text and is sometimes duplicated, range A1:A20
has
amounts.
If duplicated I need the amount of the later dated one to be
the
formula
result.

Thanks for your time.












  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Sumif criteria appears twice

Hi,

If in fact I was correct, here is a simplier solution:

=LOOKUP(MAX((B1:B20="x")*(M1:M20)),M1:M20,A1:A20)

this is array entered: Shift+Ctrl+Enter
--
Thanks,
Shane Devenshire


"Peo Sjoblom" wrote:

You are right Shane, it was sloppy of me not testing the
values better.

--


Regards,


Peo Sjoblom

--


Regards,


Peo Sjoblom

"ShaneDevenshire" wrote in
message ...
Hi,

I probably don't understand something on this one, but why don't you test
the previous formula by reversing the order of the two dates and see if it
still works. In other words if M5 has the earlier date and M15 the later
date, change the dates in M15 and M5 and see if the formula still returns
the
correct value. If I read the formula correctly it is returning the Max
value
in column A not the value for the Max date in column M.

If this is so, here is one solution:

=IF(COUNTIF(B1:B20,"x")<2,"",INDEX(A1:A20,MATCH(MA X((B1:B20="x")*(M1:M20)),M1:M20,0)))

--
Thanks,
Shane Devenshire


"vadda" wrote:

Thanks for your help Peo, this did find the final result. I really
appreciate
you time.

"Peo Sjoblom" wrote:

You didn't say that in your original post

"If duplicated I need the amount of the later dated one to be the
formula
result."

You didn't say that you didn't want any result at all if it only
occurred
once


=IF(COUNTIF(B1:B20,"x")<2,"",MAX(IF((B1:B20="x")*( M1:M20),A1:A20)))

entered the same way will return blank if it occurs once




--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
Peo,

Thank you for the suggestion, but the formula below returns a value
even
if
the text occurs once. I am looking for a formula that will only
return a
value if the text appears twice. Maybe I'm doing something wrong.

"Peo Sjoblom" wrote:


=MAX(IF((B1:B20="x")*(M1:M20),A1:A20))


entered with ctrl + shift & enter



will return what's in A1:A20 where B1:B20 is x (replace x with your
criteria)

and if there are more than one occurrence of x it will return the
one
with
the
most recent/later date in M1:M20

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
The dates are in column M1:M20

"Peo Sjoblom" wrote:

Where are the dates?

--


Regards,


Peo Sjoblom

"vadda" wrote in message
...
How would one set up a formula for:
Range B1:B20 is text and is sometimes duplicated, range A1:A20
has
amounts.
If duplicated I need the amount of the later dated one to be
the
formula
result.

Thanks for your time.













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
SUMIF Criteria JC Excel Worksheet Functions 5 May 7th 08 06:58 PM
how do i count the number of times criteria appears in a worksheet MarkWatson Excel Worksheet Functions 2 August 1st 06 07:09 AM
SUMIF with two criteria brodiemac Excel Discussion (Misc queries) 3 August 9th 05 05:04 PM
nested sumif or sumif with two criteria dshigley Excel Worksheet Functions 5 April 5th 05 03:34 AM
SUMIF with more than 1 criteria Mike@Q Excel Worksheet Functions 4 November 26th 04 12:17 AM


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