cells blank if no data

Jeffsk

New Member
Joined
May 20, 2024
Messages
6
Office Version
  1. 2019
Platform
  1. Windows
  2. Mobile
The data in the cells in column C (numbers) is dependent on what's in the cells in column B (numbers): how can I format cells in column C to be blank unless there's a value in the linked/adjacent cell in B?

Thanks
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Welcome to the Board!

Your question is not quite clear. It sounds like you need a formula in column C, but how does it know what value to be in column C if there is a value in column B?
Maybe you could walk us through an actual example, and it will help clarify things.
 
Upvote 0
Welcome to the Board!

Your question is not quite clear. It sounds like you need a formula in column C, but how does it know what value to be in column C if there is a value in column B?
Maybe you could walk us through an actual example, and it will help clarify things.
This is a very simple spreadsheet - column B is hours someone's worked & C is the hours * the hourly rate e.g. [=sum(B2*20)], with a cell for the total at the bottom. At the moment all the cells in column C that have no data in the relevant column in B are automatically displaying a '0' - I'd like them to be blank unless there a value in the linked cell in column B
 

Attachments

  • excel.jpg
    excel.jpg
    24.1 KB · Views: 7
Upvote 0
There are lots of different ways to do that (changing your formula, using Custom Formatting, using Conditional Formatting, etc).
Check out this link for various options, and choose the one you like best!

The simplest maybe to change your formula from:
Excel Formula:
=sum(B2*20)
to
Excel Formula:
=IF(B2<>0,B2*20,"")

(also note that the SUM in your original formula serves no purpose, you aren't summing multiple values there, just multiplying one!).
 
Upvote 0
There are lots of different ways to do that (changing your formula, using Custom Formatting, using Conditional Formatting, etc).
Check out this link for various options, and choose the one you like best!

The simplest maybe to change your formula from:
Excel Formula:
=sum(B2*20)
to
Excel Formula:
=IF(B2<>0,B2*20,"")

(also note that the SUM in your original formula serves no purpose, you aren't summing multiple values there, just multiplying one!).
Thanks, I'll try those (y)
 
Upvote 0

Forum statistics

Threads
1,224,881
Messages
6,181,540
Members
453,054
Latest member
ezzat

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