Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 B2:D3 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:D.. 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:D" & 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy logo from sheet1 to new sheet3-10 | Excel Programming | |||
Delete Worksheets Named Sheet1, Sheet2, Sheet3, etc. | Excel Programming | |||
A1 in sheet1 =” =SUM('sheet2:sheet3'!A1)” | Excel Programming | |||
consoildate all the worksheet(example sheet1,sheet2 and sheet3 etc | Excel Worksheet Functions | |||
user changes sheet1 - have the macro xyz run on sheet3 | Excel Programming |