formula or VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top