简体   繁体   中英

Excel Formula If x in column B then y, Z, K..etc in Column A

So basically I have a spreadsheet, with a list of names in column B. For this list of names I want to assign text to add into the adjacent cell in column A.

I have tried

=IF((C:C="Name1", C:C="Name2"),"Text","")

However, this formula gives an error without any help.

Can someone please solve this for me, or give me some information on how to solve it, as I need it to finish a project for work?

You may need to refine your requirements. As I understand it, you need in cell C1 and copied down

=IF(OR(B1="Tom",B1="Bill"),"Bill or Tom","")

在此处输入图片说明

Adjust ranges and names to suit your requirement.

If I have understood correctly

=if(b1="Name 1","Text","") + if(b1="Name 2","Text","")

If the text in cell B1 is equal to Name1 or Name2 then cell A1 (or where you choose to enter the formula) will be have "Text". If B1 does not contain Name1 or Name2 then the cell will remain empty.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM