blank cells & #DIV/0! error

Jeffsk

New Member
Joined
May 20, 2024
Messages
8
Office Version
  1. 2019
Platform
  1. Windows
  2. Mobile
I want to be able to copy the formulas in D2 & G2 down the columns but I have no data yet to put in B4,5,6, etc & ditto F4,5,6, etc so I get a #DIV/0! error code.

Is there any way to have the formulas in the D & G columns before having values in the B & F columns without generating the error code i.e. appearing blank until values are entered in B & F columns?

I guess this’ll probably involve the IF & BLANK functions, but although I have read about them, I’m still not sure how to use them…any clues welcome!!

TIA

Here's the Mini-sheet

Weight, IBW, BMI, %s - Copy.xlsx
ABCDEFG
1DateAcBW (Kg)IBW (Kg)% above IBWBMIIdBMI% above IdBMI
212/11/2479.006418.9928.002510.71
32/12/2477.6517.5827.509.09
4#DIV/0!#DIV/0!
Sheet1
Cell Formulas
RangeFormula
G2:G4,D2:D4D2=((B2-C$2)/B2)*100
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
The structure of an IF statement is as follow:
=IF(condition to check, what to return if condition is true, what to return if condition is false)

So that that formula is saying is "if cell B2 is empty, then return an empty string, otherwise return your desired calculation".

See here for more details and example of the IF function: IF function in Excel: formula examples for text, numbers, dates, blanks
 
Upvote 0

Forum statistics

Threads
1,225,481
Messages
6,185,233
Members
453,283
Latest member
Shortm88

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