formula or VBA

J

Jim

I need to search through a column checking condtions. If the conditions are
met, then I want to enter the corresponding value in the column next to it
into a different cell. Basically, I want to search column A and, if the
conditions are met, put the value in B into C. Would this be easier via
formula or code? And maybe some starting suggestions would be nice if you
don't mind.
 
D

Don Guillett

in a formula in col b
=if(cond,a1,"")
using vba
for each c in range("a1:a100")
if cond then c.offset(0,1)=c
next
 
P

Peo Sjoblom

I'd say formula, use something like this in C

=IF(A2=condition,B2,"")

copy down as long as needed, then you might want to copy and paste special
as values in place to make the values independent..

Regards,

Peo Sjoblom
 
Top