Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Formula to Find Latest Transaction Date and amount for a customer

Have a sheet with Column A showing customer ID and column B showing Date
of transaction and column C showing Transaction amount. I would like to
use a formula to find the most recent transaction date and transaction
amount for a customer Id that is entered into a cell on another sheet.
Thank you for any help.

Phil
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 623
Default Formula to Find Latest Transaction Date and amount for a customer

The Match function will find the row the Client ID is on. The Index function
will access a cell by its row and column number. So,

=index(A:C,match("CustID",A:A,0),2) will find the Date, and
=index(A:C,match("CustID",A:A,0),3) will find the Transaction amount

--
Regards,
Fred


"Phil B" wrote in message
...
Have a sheet with Column A showing customer ID and column B showing Date of
transaction and column C showing Transaction amount. I would like to use a
formula to find the most recent transaction date and transaction amount for a
customer Id that is entered into a cell on another sheet. Thank you for any
help.

Phil



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Formula to Find Latest Transaction Date and amount for a customer

The most *recent* date would be the largest, so, if your data was on Sheet1,
from A1 to C24, try this in Sheet 2, say in B1,with the customer ID entered
in A1:

=SUMPRODUCT(MAX((Sheet1!A1:A24=A1)*Sheet1!B1:B24))

Format Sheet2, B1 as a date.

Now, to return the amount for that date, enter this in C1:

=SUMPRODUCT((Sheet1!A1:A24=A1)*(Sheet1!B1:B24=B1)* Sheet1!C1:C24)

NOTE - if you have *duplicate* recent dates, the formula will *total* the
amounts for those matching duplicates.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Phil B" wrote in message
...
Have a sheet with Column A showing customer ID and column B showing Date
of transaction and column C showing Transaction amount. I would like to
use a formula to find the most recent transaction date and transaction
amount for a customer Id that is entered into a cell on another sheet.
Thank you for any help.

Phil


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Formula to Find Latest Transaction Date and amount for a customer

Ragdyer wrote:
The most *recent* date would be the largest, so, if your data was on Sheet1,
from A1 to C24, try this in Sheet 2, say in B1,with the customer ID entered
in A1:

=SUMPRODUCT(MAX((Sheet1!A1:A24=A1)*Sheet1!B1:B24))

Format Sheet2, B1 as a date.

Now, to return the amount for that date, enter this in C1:

=SUMPRODUCT((Sheet1!A1:A24=A1)*(Sheet1!B1:B24=B1)* Sheet1!C1:C24)

NOTE - if you have *duplicate* recent dates, the formula will *total* the
amounts for those matching duplicates.


Thank you very much. I was playing with Sumproduct and max and thought
the solution may be with it but I didn't get there. Both your formulas
worked very well. Do you have any good references on using Sumproduct -
it appears to be an extremely powerful function.

Thanks again
Phil
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Formula to Find Latest Transaction Date and amount for a customer

Bob Phillips has a web page on the function which probably is the most
enlightening and informative reference you'll find on the subject:

http://www.xldynamic.com/source/xld.SUMPRODUCT.html


--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Phil B" wrote in message
...
Ragdyer wrote:
The most *recent* date would be the largest, so, if your data was on

Sheet1,
from A1 to C24, try this in Sheet 2, say in B1,with the customer ID

entered
in A1:

=SUMPRODUCT(MAX((Sheet1!A1:A24=A1)*Sheet1!B1:B24))

Format Sheet2, B1 as a date.

Now, to return the amount for that date, enter this in C1:

=SUMPRODUCT((Sheet1!A1:A24=A1)*(Sheet1!B1:B24=B1)* Sheet1!C1:C24)

NOTE - if you have *duplicate* recent dates, the formula will *total*

the
amounts for those matching duplicates.


Thank you very much. I was playing with Sumproduct and max and thought
the solution may be with it but I didn't get there. Both your formulas
worked very well. Do you have any good references on using Sumproduct -
it appears to be an extremely powerful function.

Thanks again
Phil




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Formula to Find Latest Transaction Date and amount for a customer

Ragdyer wrote:
Bob Phillips has a web page on the function which probably is the most
enlightening and informative reference you'll find on the subject:

http://www.xldynamic.com/source/xld.SUMPRODUCT.html


Excellent article - Again thank you for your help

Phil
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Formula to Find Latest Transaction Date and amount for a customer

You're welcome, and appreciate your feed-back.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Phil B" wrote in message
...
Ragdyer wrote:
Bob Phillips has a web page on the function which probably is the most
enlightening and informative reference you'll find on the subject:

http://www.xldynamic.com/source/xld.SUMPRODUCT.html


Excellent article - Again thank you for your help

Phil


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
find latest date in a row, when dates have apostrophes in it brakbek Excel Discussion (Misc queries) 3 January 19th 07 09:14 PM
Transaction type/ Transaction amount in two separate columns Mike New Users to Excel 5 November 9th 06 02:38 PM
Need help to find a date (latest date) from a column CraigNowell Excel Worksheet Functions 4 March 20th 06 10:47 PM
Need help to find a date (latest date) from a column Max Excel Worksheet Functions 0 March 20th 06 02:49 PM
code not unique find latest date Barbara Wiseman Excel Discussion (Misc queries) 3 December 11th 05 08:50 AM


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