D
Dan R.
I'm trying to loop down a column and copy and paste the values to
another wb depending on the cell value. Possibly something like this?
set ws = activesheet
set wb = workbooks.open("c:\file.xls")
set rng = .range(.cells(1, 1), .cells(rows.count, 1).end(xlup))
for each i in rng
select case cells(i, 1)
case "x"
cells(i, 1).copy wb.range("a1").paste
case "y"
cells(i, 1).copy wb.range("b1").paste
case "z"
cells(i, 1).copy wb.range("c1").paste
end select
next
Thanks,
-- Dan
another wb depending on the cell value. Possibly something like this?
set ws = activesheet
set wb = workbooks.open("c:\file.xls")
set rng = .range(.cells(1, 1), .cells(rows.count, 1).end(xlup))
for each i in rng
select case cells(i, 1)
case "x"
cells(i, 1).copy wb.range("a1").paste
case "y"
cells(i, 1).copy wb.range("b1").paste
case "z"
cells(i, 1).copy wb.range("c1").paste
end select
next
Thanks,
-- Dan