Master sheet to work sheets
Closed
Wayvic
Posts
27
Registration date
Tuesday 9 June 2015
Status
Member
Last seen
3 September 2015
-
9 Jun 2015 à 10:28
vcoolio Posts 1411 Registration date Thursday 24 July 2014 Status Contributor Last seen 6 September 2024 - 26 Jun 2015 à 03:41
vcoolio Posts 1411 Registration date Thursday 24 July 2014 Status Contributor Last seen 6 September 2024 - 26 Jun 2015 à 03:41
Related:
- Mastersheet
- Google sheets download - Download - Spreadsheets
- Little alchemy cheat sheet - Guide
- How to copy data from one excel sheet to another - Guide
- Master royale - Download - Strategy
- Copying data from one Excel sheet to another. ✓ - Excel Forum
13 responses
vcoolio
Posts
1411
Registration date
Thursday 24 July 2014
Status
Contributor
Last seen
6 September 2024
262
10 Jun 2015 à 07:49
10 Jun 2015 à 07:49
Hello Wayvic,
If I have understood you correctly, you want only the required date transferred to whichever sheet you select.
I'm not sure if you want the date cell addresses fixed, i.e. say A2 in the Master sheet and A2 in all the other sheets which would mean that you have only one "input" cell (A2) in the Master sheet and only one date cell (A2) in each of the other sheets. These, of course, would be overwritten once a new date is placed in A2 in the Master sheet.
However, for the sake of the exercise, the following code assumes a date column (A) in the Master sheet and in all the other sheets. This way, you can place as many dates as you wish in Column A of the Master sheet, transfer them and then keep them in all sheets.
(Perhaps you could clarify all the above for us). The code is as follows:-
The code is a "Double Click" event, so you just double click on the required date and an Input Box will pop up. In the Input Box, type in the sheet (name or number) of your choice and the date will be transferred to the relevant sheet (Column A in this case).
You can peruse my test work book here:-
https://www.dropbox.com/s/kx7hhlrniqv8p5m/Wayvic.xlsm?dl=0
to see how it works.
To implement the code, right click on the Master tab and select "view code". In the big white field that appears, just paste the above code.
Please note that entries into the Input Box are case sensitive, so ensure that your spelling, punctuation etc. is exactly as per the sheet tab.
I hope that this helps.
Cheerio,
vcoolio.
If I have understood you correctly, you want only the required date transferred to whichever sheet you select.
I'm not sure if you want the date cell addresses fixed, i.e. say A2 in the Master sheet and A2 in all the other sheets which would mean that you have only one "input" cell (A2) in the Master sheet and only one date cell (A2) in each of the other sheets. These, of course, would be overwritten once a new date is placed in A2 in the Master sheet.
However, for the sake of the exercise, the following code assumes a date column (A) in the Master sheet and in all the other sheets. This way, you can place as many dates as you wish in Column A of the Master sheet, transfer them and then keep them in all sheets.
(Perhaps you could clarify all the above for us). The code is as follows:-
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Application.ScreenUpdating = False
Dim lRow As Long
Dim MySelection As String
lRow = Range("A" & Rows.Count).End(xlUp).Row
MySelection = InputBox("Please select the sheet you wish to enter the date into.")
If MySelection = vbNullString Then Exit Sub
Sheets("Master").Select
For Each cell In Range("A2:A" & lRow)
If cell = ActiveCell Then
ActiveCell.Copy
Sheets(MySelection).Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial xlPasteValues
End If
Next
Sheets(MySelection).Select
Application.ScreenUpdating = True
Application.CutCopyMode = False
End Sub
The code is a "Double Click" event, so you just double click on the required date and an Input Box will pop up. In the Input Box, type in the sheet (name or number) of your choice and the date will be transferred to the relevant sheet (Column A in this case).
You can peruse my test work book here:-
https://www.dropbox.com/s/kx7hhlrniqv8p5m/Wayvic.xlsm?dl=0
to see how it works.
To implement the code, right click on the Master tab and select "view code". In the big white field that appears, just paste the above code.
Please note that entries into the Input Box are case sensitive, so ensure that your spelling, punctuation etc. is exactly as per the sheet tab.
I hope that this helps.
Cheerio,
vcoolio.