Dynamic Spilled Array Formula using byrow

pto160

Active Member
Joined
Feb 1, 2009
Messages
482
Office Version
  1. 365
Platform
  1. Windows
I have a bank report with a lot of columns, I would like to be able to use a different formula in the same column depending on the situation. Is there a way to use a Dynamic spilled array to just change the result in the first row and it will change the rest of the rows?
In this example, I would like to choose 1or 2 and it will spill the formula down without me copying it down.

Book2
ABC
1Absolute/NetDebitCredit
210.0010
3-20.0020
440.0040
5-50.0050
Sheet1
Cell Formulas
RangeFormula
A2:A5A2=CHOOSE(1,B2-C2,ABS(B2-C2))
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
do you mean you just want to show everything as a positive value?
 
Upvote 0
If I choose(1, it will column B-C, which can be a negative or positive value. If I choose(2, it will be a positive value all the way down or the absolute of the columns B-C result. So I am choosing a different formula depending on the situation. I am trying to spill the results.
 
Upvote 0
How would the formula know which you wanted?
 
Upvote 0
Using A3 as an example, if I select 1 in the choose function the formula is B3-C3 (0-20=-20). If I select 2 in the choose function, then the formula is abs(b3-c3)=20.
 
Upvote 0
But how are you going to select the 1 or 2, short of actually changing the formula?
 
Upvote 0
Actually, now that you brought this to my attention, I thought about this more. I think I actually made this way more complicated than it should be. I could use a cell reference and it will update the formula in all the cells.

Book2
ABC
1Absolute/NetDebitCredit
210.0010
320.0020
440.0040
550.0050
6
7Reference
82
Sheet1
Cell Formulas
RangeFormula
A2:A5A2=CHOOSE($A$8,B2-C2,ABS(B2-C2))
 
Upvote 0
Glad you sorted it & thanks for letting us know.
 
Upvote 0
Thank you for your help and clarifying this. :) Sometimes a simpler solution works best.(y)
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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