Hello I need your help with a simple Excel issue:


This is what I have


COLUMN 1 COLUMN 2 COLUMN 3
125 YES
304 NO
1549 YES


Here is what I need:

If the string in COLUMN 2 is 'YES', copy the value in COLUMN 1 to COLUMN 3.

What would the formula for this be? I got this but it just gives me a FALSE value...

=IF(A2="YES";A3=A1;A3=0)

Thank you

PS. I'm using Excel 2007, if that helps.

In cell C2, paste:

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

Then highlight from C2 down to the end of your data and hit Ctrl-D. That will copy the formula and automatically change the references.

In cell C2, paste:

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

Then highlight from C2 down to the end of your data and hit Ctrl-D. That will copy the formula and automatically change the references.

Execellent, it worked perfectly, thank you very much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.