How to change 1 cell value based on the value of another cell

Nelly3007

New Member
Joined
Jan 16, 2020
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Good Morning Everyone,

I have some conditional formatting set up to change the row to Grey if column F shows 'Cancelled' (just as '=$F1="CANCELLED" ') but was wondering if there is also a way to set it up so that if column F shows 'Cancelled' then column E changes to £0.00? Column E is manual data entry.

Many Thanks,
 

Attachments

  • Internal Movements SS.png
    Internal Movements SS.png
    8 KB · Views: 6

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Conditional Formatting can only change the formatting of cells, not their actual value.

A cell contain contain a hard-coded value, or a formula, but never both at the same time.
So to do what you want would require one of the following:
1. VBA to update the cell, as per your requirements. This may be able to be done automatically, if the value of "Cancelled" is being entered into column F manually by someone.
2. The use of an additional column. So you would leave column E the way that it is (maybe re-label it?), but then add an additional column, label it someone like "Real Cost", and enter a formula that looks at the values in your current columns E and F, and decides which value to return.

1735904759592.png


Formula in cell F2:
Excel Formula:
=IF(G2="Cancelled",0,E2)

If you would like to pursue the VBA option, please indicate how & when your "Received?" column is being updated.
 
Upvote 0
Solution
Conditional Formatting can only change the formatting of cells, not their actual value.

A cell contain contain a hard-coded value, or a formula, but never both at the same time.
So to do what you want would require one of the following:
1. VBA to update the cell, as per your requirements. This may be able to be done automatically, if the value of "Cancelled" is being entered into column F manually by someone.
2. The use of an additional column. So you would leave column E the way that it is (maybe re-label it?), but then add an additional column, label it someone like "Real Cost", and enter a formula that looks at the values in your current columns E and F, and decides which value to return.

View attachment 120880

Formula in cell F2:
Excel Formula:
=IF(G2="Cancelled",0,E2)

If you would like to pursue the VBA option, please indicate how & when your "Received?" column is being updated.
Good Morning Joe,

I have never tried VBA before and would prefer to stick to something I can 'maintain' myself so the extra column is great and has solved my issues. Thank you very much! :)

Many Thanks,
 
Upvote 0
You are welcome.
Glad I was able to help!
 
Upvote 0

Forum statistics

Threads
1,225,737
Messages
6,186,722
Members
453,369
Latest member
positivemind

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