Getting the latest date

CHOI CL

New Member
Joined
May 19, 2019
Messages
2
have two sheets > SALES! & stocks!
date & code in SALES!$C$6:$C$5088 & SALES!$E$6:$E$5088 respectively
date out & item code in stocks!$C$59$:$C$1887 & stocks!F$59:$F$1887 respectively

once item code scanned into SALES!$E$6:$E$5088
the current date will appear on stocks!$C$59$:$C$1887 with this formula (**for item stocks!F170)
=INDEX(SALES!$C$5:$C$5087,MATCH(stocks!F170,SALES!$E$5:$E$5087,0))

but,let's say that item stocks!F170 have 4pcs and sold on different dates
how do i generate the updated date for the item?

did tried this
=INDEX(MAX(SALES!$C$5:$C$5087,MATCH(stocks!F170,SALES!$E$5:$E$5087,0)))
but it only give out the latest date in SALES!$C$6:$C$5088
not the lates date sold based on that item

please help and advance thank you
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Can you use this?


Book1
CDEF
1DateItem SKU
201-03-19item1
302-03-19item2
403-03-19item3
504-03-19item1
605-04-19item2
706-04-19item3
807-04-19item5
908-04-19item5
1009-04-19item5
1110-05-19item2
1211-05-19item3
1312-05-19item1
1413-05-19item2
1514-05-19item3
1615-05-19item1
Stocks



Book1
EF
1Item SKULatest Date
2item115-05-19
3item213-05-19
Sales
Cell Formulas
RangeFormula
F2{=MAX(IF(Stocks!$F$2:$F$16=Sales!E2,Stocks!$C$2:$C$16))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
thank you for replying

from your solution
{=MAX(IF(Stocks!$F$2:$F$16=Sales!E2,Stocks!$C$2:$C$16))}


i used this instead because i wanted the latest date
to return in stocks!$C$59$:$C$1887 based on the item code in stocks!F$59:$F$1887

so this is the formula
=
ArrayFormula(MAX(IF(SALES!$E$6:$E$5088=stocks!!F170,SALES!$C$6:$C$5088)))
**i'm using Google Sheet**

but return back as #ERROR!(formula parse error)
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,272
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top