R
Roger
Good Morning Dave,
I'm wondering if it's possible to add an additional condition to the Match
Row for the Sheet1 look-up?
After the Sheet1 Match is found in Sheet2 Column A, I'm also looking to add
a condition so that Sheet2 Column D is < "" before returning the Match value
to the noted sheet location.
Is that a possibility?
Thank you for your review once again - Roger
Dim WkbkARng as range
dim WkbkBRng as range
dim myCell as range
dim res as variant 'could be a number or an error
set wkbkARng =
workbooks("workbookA.xls").worksheets("sheet1").range("E2:e100")
set wkbkBRng =
workbooks("workbookB.xls").worksheets("sheet2").range("a2:a100") << looking
for match in same row and column D to be < ""
for each mycell in wkbkarng.cells
res = application.match(mycell.value,wkbkbrng,0)
if iserror(res) then
else
mycell.offset(0,1).copy _
destination:=wkbkbrng(res).offset(0,1)
end if
next mycell
I'm wondering if it's possible to add an additional condition to the Match
Row for the Sheet1 look-up?
After the Sheet1 Match is found in Sheet2 Column A, I'm also looking to add
a condition so that Sheet2 Column D is < "" before returning the Match value
to the noted sheet location.
Is that a possibility?
Thank you for your review once again - Roger
Dim WkbkARng as range
dim WkbkBRng as range
dim myCell as range
dim res as variant 'could be a number or an error
set wkbkARng =
workbooks("workbookA.xls").worksheets("sheet1").range("E2:e100")
set wkbkBRng =
workbooks("workbookB.xls").worksheets("sheet2").range("a2:a100") << looking
for match in same row and column D to be < ""
for each mycell in wkbkarng.cells
res = application.match(mycell.value,wkbkbrng,0)
if iserror(res) then
else
mycell.offset(0,1).copy _
destination:=wkbkbrng(res).offset(0,1)
end if
next mycell