Put Results in another cell

D

DTTODGG

OK guys/gals -

I know this MUST be simple, but I'm very new to excel.
I'm trying to look at one column (A), if the work "Dist" or "Sale" is in the
Cell, I would like to fill the next column (B) with "--", otherwise, leave
the values alone in column B.

=IF(OR(A1="Dist",A1="Sale"),B1="'--", otherwise leave value alone in B1

Thanks for everything!
 
D

DTTODGG

To clarify, I would like my formula to reside in column (B), but there is
other info already in that column. If the condition in column (A) is met,
then (B) must change, otherwise not.
 
R

Roger Govier

Hi

You were practically there. This formula is entered in B1
=IF(OR(A1="Dist",A1="Sale"),"'--", "")

Regards

Roger Govier
 
S

swatsp0p

Does B1 currently contain a value? Workbook functions cannot change a
value in another cell. It would take VBA code to do that. You could
enter this formula in C1:

=IF(OR(A1="Dist",A1="Sale"),"--",B1)

Will return the contents of B1 unless A1="Dist" or "Sale"

Then maybe Hide column B

Good Luck.
 
D

DTTODGG

Thank-you.

Yes, B1 contains a value. I used your suggestion.
Now, is there a way to copy the format from column (B) to (C)?

You guys are great!
 
S

swatsp0p

Highlight Column B (click on the 'B' col header) press CTRL+C. click i
C1, right click, select Paste Special... and choose "Formats", clic
OK.

HTH
 

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

Top