Find last entry in several worksheets

Christien

New Member
Joined
Oct 6, 2005
Messages
14
I've got a workbook that tracks all transactions for each customer of ours - there's a separate sheet within the book for each customer. Column A is strictly dates, and has a date entry for each transaction. I need to compile a list of dates of the last transaction for each customer, in a separate workbook. Is there a formula I can use that will scan column A from workbook A and take the data in the last cell with data and copy it to workbook B? It would be something like:

=('C:\customers\[transactions.xls]Smith'!Axx)

where the xx would be dynamic, in that it would update each time the workbook is opened, and would be "pastable" so that a different customer (i.e. Jones instead of Smith) would give different data.

Thanks!
Chris
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
If Sheet "Mycustomer", column A contains your dates, then
Code:
=OFFSET(Mycustomer!A1,COUNTA(Mycustomer!A:A)-1,0)
will return the last entry.
 
Upvote 0
Here is an example.

List your worksheets.


1.)

Insert > Name > Define

Name:WSLST

Type this in Refers to:

=REPLACE(GET.WORKBOOK(1),1,FIND("]",GET.WORKBOOK(1)),)&T(NOW())

Click Ok


2.)

In cell A3 input formula and copy down.

=INDEX(WSLST,ROW()-1)

In cell B3 input formula and copy down.

=LOOKUP(9.99999999999999E+307,INDIRECT("'"&A3&"'!A:A"))
Book4
ABCD
1
2
3Sheet226
4Sheet3120
5#REF!
6
7
8
9
10
11
12
13
14
Sheet1


Hope it helps!
 
Upvote 0

Forum statistics

Threads
1,215,328
Messages
6,124,295
Members
449,149
Latest member
mwdbActuary

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