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

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
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
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

Forum statistics

Threads
1,214,792
Messages
6,121,612
Members
449,039
Latest member
Mbone Mathonsi

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