christina610
New Member
- Joined
- Sep 21, 2014
- Messages
- 1
Hi there,
Im creating a dashboard. I have a table sheet name "data" with alot of information and values. I also have another sheet name "calculation". I have to get some value from the "data sheet" and plug into the "calculation sheet" and get the formula runs and plug the result into the "data sheet" back.
Example as below:
Data Sheet
<tbody>
</tbody>
I would like to pull the value from coloumn C,D,E,H,I,J plug into the below calculation sheet get the Total weight and plug in back to the above Data Sheet at the K - Filter Weight column. and its have to work for the each row when i click run button
Calculation Sheet
<tbody>
</tbody>
<tbody>
</tbody>
Below is the VBA code which i have did.
'pull data from calculation sheet
RowDestination = 3
Sheets("Calculator1").Select
Rows("3:1048576").Select
Selection.ClearContents
Sheets("Data").Select
LastRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
For RowA = 3 To LastRow
ProductWidth = Cells(RowA, "D")
ProdHeight = Cells(RowA, "E")
ProdLength = Cells(RowA, "F")
PleatDensity = Cells(RowA, "X")
PleatHeight = Cells(RowA, "Y")
Faceguard = Cells(RowA, "AL")
Sheets("Calculator1").Cells(RowDestination, "G") = W
Sheets("Calculator1").Cells(RowDestination, "H") = H
Sheets("Calculator1").Cells(RowDestination, "D") = D
Sheets("Calculator1").Cells(RowDestination, "L") = Faceguard
Sheets("Calculator1").Cells(RowDestination, "N") = P / Density
Sheets("Calculator1").Cells(RowDestination, "O") = P / Height
'Results(D, 32).Value = Sheets("Data").Range("AM3:AM1048576").Value
RowDestination = RowDestination + 1
' End If
' End If
Next RowA
But its not working. Need your help on this. Appriciate your help alot.
Thanks & Regards,
Keren
Im creating a dashboard. I have a table sheet name "data" with alot of information and values. I also have another sheet name "calculation". I have to get some value from the "data sheet" and plug into the "calculation sheet" and get the formula runs and plug the result into the "data sheet" back.
Example as below:
Data Sheet
A - Item Code | B -Description | C-Prod Width | D-Prod Height | E-Prod Length | F-Pack Width | G-Pack Height | H-Pleat Density | I -Pleat Height | J -Faceguard | K-Filter Weight |
15000001 | Megalam MDL13-305*305-01/20 | 305 | 305 | 66 | 301 | 301 | 30 | 45 | 20 | |
15000002 | Megalam MDL13-305*610-01/20 | 305 | 610 | 66 | 301 | 606 | 30 | 45 | 20 | |
15000003 | Megalam MDL13-610*610-01/20 | 610 | 610 | 66 | 606 | 606 | 30 | 45 | 20 | |
15000004 | Megalam MDL13-762*610-01/20 | 762 | 610 | 66 | 758 | 606 | 30 | 45 | 20 |
<tbody>
</tbody>
I would like to pull the value from coloumn C,D,E,H,I,J plug into the below calculation sheet get the Total weight and plug in back to the above Data Sheet at the K - Filter Weight column. and its have to work for the each row when i click run button
Calculation Sheet
W | H | D | Inlet | Outlet | P/Density: | P/Height: |
C | D | E | H | I | J |
<tbody>
</tbody>
kg | ||
1) Frame (kg/m) | Error | #VALUE! |
2) Media (kg/m²) | 0.07 | 0.00 |
3) Hotmelt | 0.00 | |
4) PU | 0.00 | |
6) Gasket | 0.00 | |
7) Faceguard (kg/m²) | 2.117 | 0.00 |
Total Weight | ##### |
<tbody>
</tbody>
Below is the VBA code which i have did.
'pull data from calculation sheet
RowDestination = 3
Sheets("Calculator1").Select
Rows("3:1048576").Select
Selection.ClearContents
Sheets("Data").Select
LastRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
For RowA = 3 To LastRow
ProductWidth = Cells(RowA, "D")
ProdHeight = Cells(RowA, "E")
ProdLength = Cells(RowA, "F")
PleatDensity = Cells(RowA, "X")
PleatHeight = Cells(RowA, "Y")
Faceguard = Cells(RowA, "AL")
Sheets("Calculator1").Cells(RowDestination, "G") = W
Sheets("Calculator1").Cells(RowDestination, "H") = H
Sheets("Calculator1").Cells(RowDestination, "D") = D
Sheets("Calculator1").Cells(RowDestination, "L") = Faceguard
Sheets("Calculator1").Cells(RowDestination, "N") = P / Density
Sheets("Calculator1").Cells(RowDestination, "O") = P / Height
'Results(D, 32).Value = Sheets("Data").Range("AM3:AM1048576").Value
RowDestination = RowDestination + 1
' End If
' End If
Next RowA
But its not working. Need your help on this. Appriciate your help alot.
Thanks & Regards,
Keren