Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub GetData()
RowCount = 2 With Sheets("Sheet1") Do While .Range("A" & RowCount) < "" NewItem = .Range("A" & RowCount) With Sheets("Sheet2") Set c = .Columns("A:A").Find(what:=NewItem, LookIn:=xlValues) If Not c Is Nothing Then Store1 = c.Offset(0, 1) Sheets("Sheet1").Range("C" & RowCount) = Store1 Store2 = c.Offset(0, 2) Sheets("Sheet1").Range("D" & RowCount) = Store2 End If End With RowCount = RowCount + 1 Loop End With End Sub "Ren" wrote: hi, i have two sheets, i want the item to be matched and quantity should be placed in store1 or store2 of sheet1 based on the location in sheet2 how can i include this inside a For Each loop?? or If else condition item requiredQty store1 store2 apple 6 apple 7 kiwi 5 guava 10 item store1 store2 total orange 3 2 5 apple 5 8 13 guava 10 12 22 thanks ren |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy data from sheet2 to sheet1 when sheet2 has variable # of rows | Excel Discussion (Misc queries) | |||
Automatic populate Sheet2 with data from Sheet1 based on criteria. | Excel Discussion (Misc queries) | |||
A1 Sheet2 is linked to A1 sheet1 so that user enters value(abc123) a1 sheet1 and A1 sheet2 is updated | Excel Programming | |||
Function on Sheet1 based on data on Sheet2 | Excel Worksheet Functions | |||
copy data from sheet1 based on criteria in sheet2 to sheet3 | Excel Programming |