Creating a table based on another table

jonybandana

New Member
Joined
Dec 16, 2022
Messages
32
Office Version
  1. 365
Platform
  1. Windows
Hi! So I have a huge table (we´ll call it TableA) and I would like to generate another table (TableB) which has to have the following properties:

  1. It updates automatically (possibly in real-time) when TableA is updated.
  2. Any changes made on TableB must be reflected on TableA (also in real-time if possible).
The location of the table is not relevant, it can be in a different document or in the same one (I would prefer it is on the same document).

Is there any way to do this?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
To complete the previous macro ...i.e To Filter AND to Copy Filtered Rows to another Sheet
VBA Code:
Sub Filter_Copy_Rows()
' Example From Sheet2 to Sheet3
' Adjust to your situation
Dim rng1 As Range, rng2 As Range
Set rng1 = Worksheets("Sheet2").Range("A1").CurrentRegion
rng1.AutoFilter field:=3, Criteria1:="Truck"
Set rng2 = rng1.SpecialCells(xlCellTypeVisible)
rng2.Copy Destination:=Sheet3.Range("A1")
Sheet2.AutoFilterMode = False
Sheet3.Select
End Sub
 
Upvote 1
Solution
Hi,

Quite simply ... with an Even Macro : Worksheet_Change()

Terribly sorry, but I have no experience with VBA, could you give me an example?

Let´s grab the example sheet I´ll upload, how could I extract the columns "Part", "Stock" and "supplier" to another sheet and only extract those that belong to project "Truck"?


PartStockProjectSupplier
123​
100​
BusJim
432​
50​
TruckJohn
543​
23​
TruckJim
54​
51​
BusJohn
234​
0​
TruckJim
423​
0​
TruckJohn
5135​
123​
BusJim
6547​
55​
TruckJohn
84​
66​
TruckJim
352​
12​
BusJohn
6​
5​
TruckJim
745​
0​
TruckJohn
3457​
0​
BusJim
245​
1231​
TruckJohn
562​
55​
TruckJim
233242​
1​
BusJohn
 
Upvote 0
Hi again,
What you are asking is a bit different ... but even easier ... :)
as a quick illustration :
VBA Code:
Sub FilterRows()
With Worksheets("Sheet1").Range("A1:D17")
    .AutoFilter field:=3, Criteria1:="Truck"
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,401
Messages
6,124,705
Members
449,182
Latest member
mrlanc20

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