Thread
:
macro cut and paste
View Single Post
#
12
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
macro cut and paste
Besides end sub,
set target_rng = .rnage("B1")
--
Don Guillett
SalesAid Software
"hey" wrote in message
...
Below what you gave me last week doesnt work. It doesnt like the last
end if?
Thanks
sub foo()
dim look_rng as range
dim source_rng as range
dim target_rng as range
dim ret_value
with activesheet
set look_rng = .range("A1")
set target_rng = .rnage("B1")
set source_rng = .range("C1:D100")
end with
ret_value=application.vlookup(look_rng,source_rng, 2,0)
if iserror(ret_value) then
ret_value=""
end if
target_rng=ret_value
end if
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]