LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default Formula to calculate the data of the last order

Enter the following in E2
=SUMPRODUCT(--(A2:A7=MAX(IF(B2:B7=B2,A2:A7,""))),--(B2:B7=B2),D2:D7)
and press CTRL-SHIFT-ENTER
and copy down

This will give the $ amount for the latest date for the code in Col B

If you just want for code "z" then use this
=SUMPRODUCT(--(A2:A7=MAX(IF(B2:B7="Z",A2:A7,""))),--(B2:B7="Z"),D2:D7)
Don't forget to press CTRL-SHIFT-ENTER

Replace 7 in A7, B7 etc by the last row number of your data set

"khaled" wrote:

A B C D
1 P O Date Code Kgs $
2 01-Jan-08 R 1 10
3 03-Feb-08 F 2 20
4 07-Mar-08 X 3 30
5 10-Mar-08 Z 10 40
6 27-Apr-08 G 5 50
7 01-May-08 Z 6 60

For code Z, I need a formula to calculate the $ of the last order.
Z of course can have several dates.

 
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
can I calculate S&H on a sliding scale in an order form? TNP Excel Worksheet Functions 1 December 1st 05 05:31 AM
how do i calculate the order quantity? cfo guy Excel Worksheet Functions 1 February 25th 05 01:18 AM
Making Excel Calculate In Correct Order Carl Bowman Excel Discussion (Misc queries) 1 February 15th 05 03:23 AM
Daily Macro to Download Data, Order and paste in order Iarla Excel Worksheet Functions 1 November 17th 04 01:59 PM
What function or formula do I use to calculate ROI with this data? Dave Excel Worksheet Functions 9 November 5th 04 02:42 PM


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