How to delete contents of another cell if current cell has a specific value

blank___space

New Member
Joined
Nov 27, 2017
Messages
2
Hi, I made this sample file. I would like to do the following under Nov Sales Sheet.

https://docs.google.com/spreadsheets/d/1OawXSruy50khcw_zQDQtd7vhPlslpmsQUR-gUoCgrU4/edit?usp=sharing

If SALE(C5) = "Y"(a drop down Y and N list), I would like to delete the contents of "SELLING FOR.(E5)"
and same thing if SALE = "N" I would like to delete the contents of "SALE PRICE"(F5).

I don't think it's do-able with Conditional Formatting.

Note: both SELLING FOR(E5) and SALE PRICE (F5) column pulls up report from another worksheet and has this formula:

=IFERROR(VLOOKUP(B5,INVENTORY!<wbr>$A$8:$P$88,10,FALSE),0)

and =IFERROR(VLOOKUP(B5,INVENTORY!<wbr>$A$8:$P$88,11,FALSE),0) respectively.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
You can just include an IF function like this:

E5 = IF(C5 = "N", IFERROR(VLOOKUP(B5,INVENTORY!<wbr style="color: rgb(51, 51, 51); font-family: Roboto; background-color: rgb(250, 250, 250);">$A$8:$P$88,10,FALSE),0), "")

F5 = IF(C5 = "Y",
IFERROR(VLOOKUP(B5,INVENTORY!<wbr style="color: rgb(51, 51, 51); font-family: Roboto; background-color: rgb(250, 250, 250);">$A$8:$P$88,11,FALSE),0), "")

Or if you just want the cell to go to a 0 value instead of completely empty:

E5 = IF(C5 = "N", IFERROR(VLOOKUP(B5,INVENTORY!<wbr style="color: rgb(51, 51, 51); font-family: Roboto; background-color: rgb(250, 250, 250);">$A$8:$P$88,10,FALSE),0), 0)

F5 = IF(C5 = "Y",
IFERROR(VLOOKUP(B5,INVENTORY!<wbr style="color: rgb(51, 51, 51); font-family: Roboto; background-color: rgb(250, 250, 250);">$A$8:$P$88,11,FALSE),0), 0)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,561
Messages
6,114,315
Members
448,564
Latest member
ED38

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