Minor Workbooks Updating The Main Workbook

Copper Contributor

Hi All,

I'm starting a project to re-do an age old excel system. I have a good understanding of what I want to do but there's one small detail I can't work out.


===EXISTING SYSTEM===

We have a master spreadsheet which contains records of all business conducted
We also have 8 advisors who have their own minor spreadsheet.

When a transaction is done, the advisors update both their minor one and the master. Ultimately, this has left the minor ones all being different and the main one an absolute mess.


===NEW SYSTEM PLAN===

My plan is to have a basic minor spreadsheet which requires minimal input on the advisor part and have the master one update automatically so they don't have access to it.

They're all going to be in the same folder so linking the spreadsheets wont be a problem. The MAIN workbook will have tabs as follows.

MAIN
ADVISOR 1
ADVISOR 2
ADVISOR 3
etc etc


The ADVISOR tabs will be a direct mirror of the individual minor workbooks. The minor workbooks will be just 1 tab



===THE PROBLEM===

Main needs to list all the transactions in the order they are entered. For example, Advisor A completes a transaction, then ADV B, then ADV A, then ADV C etc etc...

I only know how to link cells so a block would have to be advisor A and a block Advisor b and so on. I need it to be clever and list in order of data entered. Please see image below

 

 

The Minor Workbooks are listing in chronological order for each advisor whereas the MAIN workbook needs to list in chronological order for all advisors.

Once again I really appreciate any help received. Theres probably multiple approaches and i'd be interested in researching them for future projects so any links for further reading would be gratefully received.

Wishing you all the best
Danjo

NEW WIP PROJECT.JPG

2 Replies

@danjojackson ,

 

Add a timestamp to each minor workbook entry and use the timestamp to order merged records.

 

Non-VBA method: Request each adviser use this keyboard shortcut. 

 

To insert the current date and time, press Ctrl+; (semi-colon), then press Space, and then press Ctrl+Shift+; (semi-colon).

 

VBA alternative: Add this code to each minor workbook Sheet1.

 

Private Sub Worksheet_Change(ByVal Target As Range)

Dim oLo As ListObject
Dim oLR As ListRow
Dim lRow As Long

If Not IsEmpty(Target.Cells(1)) Then
If Not Target.ListObject Is Nothing Then
Set oLo = Target.ListObject
lRow = Target.Cells(1).Row - oLo.HeaderRowRange.Row
Set oLR = oLo.ListRows(lRow)
If IsEmpty(oLR.Range(1)) Then oLR.Range(1) = Now()
End If
End If

End Sub

 

The VBA alternative assumes each Minor worksheet has a table with a timestamp column like so:

 

table.png

 

The VBA advantage is the timestamp is entered automatically. 

Really Helpful Craig, Thanks

Was going to research this but you saved me the hassle! Muchos Gracias.

All The Best
Danjo