Have formula repeat for a value in a cell then use a different formula for a value number of steps

Tmoff

New Member
Joined
Aug 12, 2022
Messages
2
Office Version
  1. 365
Platform
  1. MacOS
I am quite new to some of excels formula and coding, and have been struggling to understand how to set up certain formula.
My current problem is that I have three cells which contain variables, the value of these variables is then used to fill cells. The three variables of concern are flow demand M1, batches/ hour, delivery time M1, and wish to have the values in these cells fill row F11:74 (1 minute to 60 minutes). Effectively I have managed to use formula to have these cells be filled for the demand over the delivery time, however if 2 batches were to occur in an hour I don't understand how to get the formula to repeat after the 10 minute delivery + the break between. I have attached a mini sheet to help articulate and illustrate my issue, if anyone can help I would appreciate it.

tank calc 2hr snapshot.xlsx
ABCDEFGHIJKLMNOPQRSTUVWX
1Input Tab
2
3Mains water Temp (DegC)|18Flow Demand Mixer 1 (L)100Delivery time Mixer 1 (min)10Density (kg/m3)997Flow Demand (L/min)10Spacing Value 25
4
5Initial tank temp (DegC)10Flow Demand Mixer 2 (L)300Delivery time Mixer 2 (min)20Set point of Heat exchanger (DegC)2Flow Demand (L/min)15Spacing Value20
6
7Initial tank level (L)1200Batches / hour Mixer 12Flow from Mains62.5
8
9Constant circular flow (L/s)50Batches / hour Mixer 22Specific Heat Capacity (kJ/kgDegC)4.186
10
11MinsDegCDegCLLL/minKg/minL/minKg/minL/minKg/minL/minKg/minL/minKg/minKw
12Time Mains water temp Tank tempTank levelTank mass volumeFlow to M1Mass flow M1Flow to M2Mass flow M2Flow to HEX Mass flow to HEXFlow return tankMass flow returnFlow from mains Mass flow mainsHEX duty
131181012001196.4109.971514.9557574.7755049.8562.562.312541.73442
1421810.074074071237.51233.7875109.971514.9557574.7755049.8562.562.312542.12084981
1531810.1401401412751271.175109.971514.9557574.7755049.8562.562.312542.46550343
1641810.199251881312.51308.5625109.971514.9557574.7755049.8562.562.312542.77387772
1751810.2523008813501345.95109.971514.9557574.7755049.8562.562.312543.05062388
1861810.300044981387.51383.3375109.971514.9557574.7755049.8562.562.312543.29969542
1971810.3431311214251420.725109.971514.9557574.7755049.8562.562.312543.5244673
2081810.382113821462.51458.1125109.971514.9557574.7755049.8562.562.312543.72783234
2191810.4174702215001495.5109.971514.9557574.7755049.8562.562.312543.91227969
22101810.44961241537.51532.8875109.971514.9557574.7755049.8562.562.312544.07995911
23111810.478897515751570.275001514.9556564.8055049.8562.562.312538.33503586
24121810.505481961622.51617.6325001514.9556564.8055049.8562.562.312538.45523027
25131810.5296801516701664.99001514.9556564.8055049.8562.562.312538.56463584
26141810.551762661717.51712.3475001514.9556564.8055049.8562.562.312538.6644759
27151810.571963317651759.705001514.9556564.8055049.8562.562.312538.75580761
28161810.590484921812.51807.0625001514.9556564.8055049.8562.562.312538.83954812
29171810.6075041618601854.42001514.9556564.8055049.8562.562.312538.91649599
30181810.623175341907.51901.7775001514.9556564.8055049.8562.562.312538.98734897
31191810.6376337519551949.135001514.9556564.8055049.8562.562.312539.05271878
32201810.650998392002.51996.4925001514.9556564.8055049.8562.562.312539.11314335
33211810.663374220502043.8500005049.855049.8562.562.312530.13007477
34221810.674776622112.52106.162500005049.855049.8562.562.312530.16973092
35231810.6853067321752168.47500005049.855049.8562.562.312530.20635326
36241810.695052692237.52230.787500005049.855049.8562.562.312530.2402484
37251810.7040916823002293.100005049.855049.8562.562.312530.27168483
38261810.712491562362.52355.412500005049.855049.8562.562.312530.30089849
39271810.7203121324252417.72500005049.855049.8562.562.312530.3280974
40281810.727606312487.52480.037500005049.855049.8562.562.312530.35346563
41291810.7344210725502542.3500005049.855049.8562.562.312530.37716645
42301810.740798182612.52604.662500005049.855049.8562.562.312530.39934521
Sheet2 (3)
Cell Formulas
RangeFormula
U3,U5U3=G3/K3
X3,X5X3=(60-K3)/G7
B13:B42B13=$C$3
C13C13=C5
D13D13=C7
E13:E42,G13:G42,I13:I42,K13:K42,M13:M42,O13:O42E13=(D13/1000)*$O$3
F13:F42F13=IF(ROW(F13)<$K$3+13,IF(U$3>0,$U$3,""),"0")
H13:H42H13=IF(ROW(H13)<$K$5+13,IF(U$5>0,$U$5,""),"0")
J13:J42J13=$C$9+F13+H13
L13:L42L13=J13-H13-F13
N13:N42N13=$K$7
P13:P42P13=((K13/60)*$K$9*(C13-$O$5))
C14:C42C14=(((B14*O14*$K$9)+(C13*E14*$K$9)+($O$5*$K$9*M14))/((O14*$K$9)+(E14*$K$9)+(M14*$K$9)))
D14:D42D14=D13-(F13+H13)+N13
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I no longer need a reply to this as I have found a formula which works.
=IF(MOD(A13, ROUNDDOWN(121/$G$7, 0))<$K$3, $G$3/$K$3, 0)
 
Upvote 0
Solution

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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