Auto data move between Tabs

propolis

New Member
Joined
Mar 22, 2019
Messages
36
Hi,

From the link to my test spreadsheet, I have 3 tabs, Site 1 and site 2 and site 3

What I am after is that the data of the 3 tabs populate the Main Page tab automatically as I enter data in Site 1 and site 2 and site 3 tabs

What would be nice is if I am on the Main Page tab, and I delete a row, it also deletes it from the relevant row in the relevant Site 1 and site 2 and site 3 tabs

Thank you for any help

Test Book1

:)
 
Hello again,

You could test the following macros :

Code:
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
' Deletes the corresponding Record in Main Page tab as soon as DoubleClick is made in any row in Column D
If Target.Column <> 4 Then Exit Sub
Dim str As Long
  If Sh.Name <> "Main Page" Then
    str = Sh.Cells(Target.Row, 1).Value
    Sh.Rows(Target.Row & ":" & Target.Row).Delete
  End If
  Sheet1.Rows(Application.Match(str, Sheet1.Range("A:A"), 0) & ":" & Application.Match(str, Sheet1.Range("A:A"), 0)).Delete
Cancel = True
End Sub


Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
' Adds a Record to Main Page tab as soon as input is made in Column D
If Target.Column <> 4 Then Exit Sub
Dim last As Long
Dim x As Long
last = Sheet1.Cells(Application.Rows.Count, "A").End(xlUp).Row + 1
If Sh.Name <> "Main Page" Then Sh.Range("A" & Target.Row & ":D" & Target.Row).Copy Destination:=Sheet1.Range("A" & last)
End Sub

Hope this in line with your expectations
 
Last edited:
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Forgot to mention ...

You can only operate the Delete process ...

with Unique Identifiers in all of your A columns ...
 
Last edited:
Upvote 0
Hello,

Both event macros only need to be copied in following module : ThisWorkbook

Hope this clarifies
 
Upvote 0
Forgot to mention ...

You can only operate the Delete process ...

with Unique Identifiers in all of your A columns ...


I have just tried the delete option and that does not seem to work. I hve got uniue ID's in every tab sheet, ecept master as that wil get it fom the tab sheets

When I delete the row either from the main page or from Tab 1 - 3 it does no remove
 
Upvote 0
Hello,

Just tested both macros at my end .. and they work as expected ...

As indicated ... the Double-Click feature used to delete a record is designed to operate in any tab sheet ...

Hope this clarifies
 
Upvote 0
Hi,

Tried the double click action, but not sure wht I am doing as nothing is hapening.

Any suggestion apprecate on howto ge the double click working to delete individual rows in the tabs
 
Upvote 0
As indicated earlier ... working as expected at my end ...

Sorry cannot be of further assistance ...

Good Luck
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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