Trying to create a Dynamic array from a somewhat complex formula but keep getting #N/A errors randomly.
For some reason, the y value of the equations doesn't like it.
Effectively the #N/A
for the first instance is saying it can't find 0.57 in the particle diameter table on the left, despite clearly being listed.
Data to mimic:
Table1:
Particle Diameter δ (μm) | Rairborne(δ) (kg/s) | γ(δ) |
---|---|---|
0.00 | 0 | 0.000555556 |
0.19 | 2.33195E-15 | 0.000556338 |
0.38 | 5.3411E-15 | 0.000558686 |
0.57 | 7.49672E-15 | 0.000562599 |
0.76 | 8.93319E-15 | 0.000568078 |
0.95 | 9.85973E-15 | 0.000575121 |
1.14 | 1.04323E-14 | 0.00058373 |
1.33 | 1.07581E-14 | 0.000593905 |
1.52 | 1.09105E-14 | 0.000605644 |
1.71 | 1.09403E-14 | 0.000618949 |
1.90 | 1.0883E-14 | 0.000633819 |
2.09 | 1.07639E-14 | 0.000650254 |
InputParameters:
Spray Duration (minutes) |
---|
11.1 |
Problematic Formula:
=MAKEARRAY(10,11,LAMBDA(x,y,IF(x*7.8 <= InputParameters[[Spray Duration (minutes)]:[Spray Duration (minutes)]] * 60,XLOOKUP(y*0.19, Table1[[Particle Diameter δ (μm)]:[Particle Diameter δ (μm)]], Table1[[Rairborne(δ) (kg/s)]:[Rairborne(δ) (kg/s)]]) * (1 - EXP(-XLOOKUP(y*0.19, Table1[[Particle Diameter δ (μm)]:[Particle Diameter δ (μm)]], Table1[[γ(δ)]:[γ(δ)]]) * x*7.8)) / XLOOKUP(y*0.19, Table1[[Particle Diameter δ (μm)]:[Particle Diameter δ (μm)]], Table1[[γ(δ)]:[γ(δ)]]),XLOOKUP(y*0.19, Table1[[Particle Diameter δ (μm)]:[Particle Diameter δ (μm)]], Table1[[Rairborne(δ) (kg/s)]:[Rairborne(δ) (kg/s)]]) / XLOOKUP(y*0.19, Table1[[Particle Diameter δ (μm)]:[Particle Diameter δ (μm)]], Table1[[γ(δ)]:[γ(δ)]]) * (1 - EXP(-XLOOKUP(y*0.19, Table1[[Particle Diameter δ (μm)]:[Particle Diameter δ (μm)]], Table1[[γ(δ)]:[γ(δ)]]) * (InputParameters[[Spray Duration (minutes)]:[Spray Duration (minutes)]] * 60))) * EXP(-XLOOKUP(y*0.19, Table1[[Particle Diameter δ (μm)]:[Particle Diameter δ (μm)]], Table1[[γ(δ)]:[γ(δ)]]) * (x*7.8 - (InputParameters[[Spray Duration (minutes)]:[Spray Duration (minutes)]] * 60))))))
Correct data (When using the long formula and dragging) (particle size on top, Time down the LHS):
| TIME (s) | 0 | 0.19 | 0.38 | 0.57 | 0.76 | 0.95 ||----------|---------|---------|---------|---------|---------|---------|| 0 | 0.00E+00| 0.00E+00| 0.00E+00| 0.00E+00| 0.00E+00| 0.00E+00|| 7.80 | 0.00E+00| 1.81E-14| 4.16E-14| 5.83E-14| 6.95E-14| 7.67E-14|| 15.60 | 0.00E+00| 3.62E-14| 8.30E-14| 1.16E-13| 1.39E-13| 1.53E-13|| 23.40 | 0.00E+00| 5.42E-14| 1.24E-13| 1.74E-13| 2.08E-13| 2.29E-13|| 31.20 | 0.00E+00| 7.21E-14| 1.65E-13| 2.32E-13| 2.76E-13| 3.05E-13|| 39.00 | 0.00E+00| 9.00E-14| 2.06E-13| 2.89E-13| 3.45E-13| 3.80E-13|| 46.80 | 0.00E+00| 1.08E-13| 2.47E-13| 3.46E-13| 4.13E-13| 4.55E-13|| 54.60 | 0.00E+00| 1.25E-13| 2.87E-13| 4.03E-13| 4.80E-13| 5.30E-13|| 62.40 | 0.00E+00| 1.43E-13| 3.28E-13| 4.60E-13| 5.48E-13| 6.04E-13|| 70.20 | 0.00E+00| 1.61E-13| 3.68E-13| 5.16E-13| 6.15E-13| 6.78E-13|| 78.00 | 0.00E+00| 1.78E-13| 4.08E-13| 5.72E-13| 6.82E-13| 7.52E-13|| 85.80 | 0.00E+00| 1.95E-13| 4.47E-13| 6.28E-13| 7.48E-13| 8.25E-13|
For some reason it seems to think this is code and wont let me submit unless formatted as code despite using markdown
LINK TO WORKBOOK IN IMAGE:
https://1drv.ms/x/s!AsrLaUgt0KCLxXOWIrFQWEaQoxky?e=vnORUu
Update1 Adding &"":
Update2 Adding TRUE and Setting y*0.19 to the array