IF CELL IS ONE FROM A LIST, CLEAR ADJACENT CELL

turkanet

New Member
Joined
Aug 20, 2017
Messages
38
Office Version
  1. 2021
Platform
  1. Windows
Dear friends,
I have a list in N2:N. I need to clear cell contents in rows of B2:B if row in C2:C is in N2:N
e.g.: if C4 exist in N2:N (matching completely, not partly), then B4 cell content must be cleared.

thank you in advance
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
What is entered in col B? Is it a formula or user entered data?
And when should col B be cleared? ie: when a change is made to the sheet, when the user decides, or some other event?
 
Upvote 0
dear dreid1011,
=IF(C2="",,"X") is in B2. i need to clear it like typing delete button from keyboard.
 
Upvote 0
dear dreid1011,
=IF(C2="",,"X") is in B2. i need to clear it like typing delete button from keyboard.
You want to remove the formula then? Or still have the formula return "" if col C matches any value in col N?
 
Upvote 0
Is this what you're after?
Book1
ABCN
1
2 GreenRed
3XYelloOrange
4 Yellow
5Green
6Blue
7Purple
Sheet2
Cell Formulas
RangeFormula
B2:B4B2=IF(C2="","",IF(ISNUMBER(MATCH(C2,$N$2:$N$7,0)),"","X"))
 
Upvote 0
i need b2 to be empty, witout any formula or something
 
Upvote 0
i need b2 to be empty, witout any formula or something
Then you're going to need VBA. If you could answer the following questions from my post#2, it will help us on our way:

And when should col B be cleared? ie: when a change is made to the sheet, when the user decides, or some other event?
 
Upvote 0
Dreid, sorry. yes, i need vba. thank you
You still have not answered the question... I cannot provide any solution without the answer.

Please tell me...

When should col B be cleared: Should it happen when any change is made to the worksheet, or a specific range? Does it happen when the user presses a button or runs the code? Or is there some other event to trigger the code?
 
Upvote 0
Dreid,
it happens when the user presses a button or runs the code
 
Upvote 0

Forum statistics

Threads
1,221,706
Messages
6,161,406
Members
451,702
Latest member
Kc3475

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top