U
u473
I need help in switching back & forth from sheet to sheet and using
VlookUp
& Match to retrieve values at the intersect of current Row & Column.
..
For Each Cell in Sheet1 Range, do some Vlookup calculations from
Sheet3
and write results in Sheet2 same relative range.
Assume Range in Sheet1 is B23 as follows :
Row / Col A B C D
1 Position RateA RateB RateC ....
2 Manager 10 8 12
3 Cost Engr. 6 16 6
4 .............. .. .. ..
Assume RateTable in Sheet3 is B2.. as follows :
Row / Col A B C D
1 Position RateA RateB RateC ....
2 Manager 50 55 60
3 Cost Engr. 35 40 45
4 .............. .. .. ..
For each Cell in Sheet1 range which contains Hours at specific Rate
Code,
Vlookup/Match RateTable in Sheet3 for pertaining Position,
and write Hours multiplied by Rate in Sheet2 in same relative position
as in Sheet1
as follows :
Row / Col A B C D
1 Position RateA RateB RateC ....
2 Manager 500 440 720
3 Cost Engr. 210 640 270
------ Pseudo Code ------------------------
Sub Test()
Dim rng As Range
Dim RateCat As String ' Rate Category, RateA, RateB, RateC etc...
Dim Rate As Integer : Dim LastRow as Integer
Dim Position as String
LastRow = Cells(Rows.Count,"A").End(xlUp).Row
Set rng = Range("B2" & LastRow): Range("B2").Select
For Each Cell In rng
'Vlookup/Match Position and RateCat from Sheet3 and store value in
Rate
' Multiply Sheet1.ActiveCell.Value with Rate and store result in
Sheet3,
'same relative Row/Column
ActiveCell.Offset(0, 1).Select
Next Cell
End Sub
Help appreciated,
Celeste
VlookUp
& Match to retrieve values at the intersect of current Row & Column.
..
For Each Cell in Sheet1 Range, do some Vlookup calculations from
Sheet3
and write results in Sheet2 same relative range.
Assume Range in Sheet1 is B23 as follows :
Row / Col A B C D
1 Position RateA RateB RateC ....
2 Manager 10 8 12
3 Cost Engr. 6 16 6
4 .............. .. .. ..
Assume RateTable in Sheet3 is B2.. as follows :
Row / Col A B C D
1 Position RateA RateB RateC ....
2 Manager 50 55 60
3 Cost Engr. 35 40 45
4 .............. .. .. ..
For each Cell in Sheet1 range which contains Hours at specific Rate
Code,
Vlookup/Match RateTable in Sheet3 for pertaining Position,
and write Hours multiplied by Rate in Sheet2 in same relative position
as in Sheet1
as follows :
Row / Col A B C D
1 Position RateA RateB RateC ....
2 Manager 500 440 720
3 Cost Engr. 210 640 270
------ Pseudo Code ------------------------
Sub Test()
Dim rng As Range
Dim RateCat As String ' Rate Category, RateA, RateB, RateC etc...
Dim Rate As Integer : Dim LastRow as Integer
Dim Position as String
LastRow = Cells(Rows.Count,"A").End(xlUp).Row
Set rng = Range("B2" & LastRow): Range("B2").Select
For Each Cell In rng
'Vlookup/Match Position and RateCat from Sheet3 and store value in
Rate
' Multiply Sheet1.ActiveCell.Value with Rate and store result in
Sheet3,
'same relative Row/Column
ActiveCell.Offset(0, 1).Select
Next Cell
End Sub
Help appreciated,
Celeste