Repeating Formula Question

massie17

New Member
Joined
Apr 10, 2011
Messages
5
This is probably a very basic question, sorry. I am making a general ledger.

Here is what I want to do. In Cell H5, =SUM(G5+H4). If I autofill all the way down it brings the last balance with it. I want it to put a 0 or - in if G5 is empty. So if G5 is empty enter 0 or add G5 to H4.

I hope this makes sense.
Thanks,
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
=IF(G5="","-",SUM(G5+H4))

That will put a dash in if G5 is empty, but if it's not empty it will do the math.
 
Upvote 0
Welcome to the board!

The formula you showed seems to do what you are asking for. Please explain again what you want to do.
 
Upvote 0
This is probably a very basic question, sorry. I am making a general ledger.

Here is what I want to do. In Cell H5, =SUM(G5+H4). If I autofill all the way down it brings the last balance with it. I want it to put a 0 or - in if G5 is empty. So if G5 is empty enter 0 or add G5 to H4.

I hope this makes sense.
Thanks,

Try...

=IF(G5="","",SUM(G5,H4))
 
Upvote 0
I am adding up all the values in B5 thru F5 using =SUM(B5:F5), I then want to add that value to H4 and enter into H5. I would like to pull both equations all the way down the page but dont want the value in H5 to go all the way down the sheet. I tried the above formula and it didn't work.
Thanks,
 
Upvote 0
It's a little difficult to understand what you're trying to do, but I'm going to guess you mean that you don't want the reference to H4 to go all the way down and keep changing, so you should reference H4 as $H$4 in your formulas to keep it in place...:confused:
 
Upvote 0
My wife asked me to make this spreadsheet. She is keeping track of daily purchases and sales (income) for her small business. So B5 thru F5 could be negative or positive numbers. For example a sale would be put in the B column, then the next day she might purchase more materials and that would be a negative value in C6. Each row has a date column A.

So I have a total column G and a balance column H (which is the daily running balance). When I fill my equation all the way down the sheet it brings the last balance with it.
 
Upvote 0
Something like this perhaps?

<b>Sheet1</b><br /><br /><table border="1" cellspacing="0" cellpadding="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >B</td><td >C</td><td >D</td><td >E</td><td >F</td><td >G</td><td >H</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td style="text-align:right; ">0</td><td style="text-align:right; ">4</td><td style="text-align:right; ">-1</td><td style="text-align:right; ">8</td><td style="text-align:right; ">7</td><td style="text-align:right; ">18</td><td style="text-align:right; ">18</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >6</td><td style="text-align:right; ">-6</td><td style="text-align:right; ">2</td><td style="text-align:right; ">0</td><td style="text-align:right; ">-5</td><td style="text-align:right; ">4</td><td style="text-align:right; ">-5</td><td style="text-align:right; ">13</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >7</td><td style="text-align:right; ">-3</td><td style="text-align:right; ">-5</td><td style="text-align:right; ">10</td><td style="text-align:right; ">5</td><td style="text-align:right; ">-7</td><td style="text-align:right; ">0</td><td style="text-align:right; ">13</td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b>Spreadsheet Formulas</b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >G5</td><td >=SUM(B5:F5)</td></tr><tr><td >H5</td><td >=H4+G5</td></tr><tr><td >G6</td><td >=SUM(B6:F6)</td></tr><tr><td >H6</td><td >=H5+G6</td></tr><tr><td >G7</td><td >=SUM(B7:F7)</td></tr><tr><td >H7</td><td >=H6+G7</td></tr></table></td></tr></table>
 
Upvote 0
yes that is what my formulas look like. And when I take the formula and fill down for example 60 rows it brings the last value with it all the way down.

So for example if G7 is 0 I would like a - or 0 in H7.

She will always have a positive or negative, it would never equal 0 like you have it. Only on value in each row, either a sale or single expense.
 
Upvote 0
Ok...

<b>Sheet1</b><br /><br /><table border="1" cellspacing="0" cellpadding="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >B</td><td >C</td><td >D</td><td >E</td><td >F</td><td >G</td><td >H</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td style="text-align:right; ">0</td><td style="text-align:right; ">4</td><td style="text-align:right; ">-1</td><td style="text-align:right; ">8</td><td style="text-align:right; ">7</td><td style="text-align:right; ">18</td><td style="text-align:right; ">63</td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b>Spreadsheet Formulas</b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >G5</td><td >=IF(COUNT<span style=' color:008000; '>(B5:F5)</span>=0,"",SUM<span style=' color:008000; '>(B5:F5)</span>)</td></tr><tr><td >H5</td><td >=IF(G5="","",H4+G5)</td></tr></table></td></tr></table>
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,348
Members
452,907
Latest member
Roland Deschain

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