Multiple formula arguments in one cell

maro31

New Member
Joined
Mar 2, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi all,
I have a function (custom for a separate tool) that has many arguments. Since there are many cells referencing all these (18) arguments the file size grows. So i want to combine the arguments in one cell.

Simplified, usually you have SUM(A1, B1) where A1 contains a value and B1 contains a value.
But i want to say SUM(C1) where C1 contains a value like "A1, B1" and then return the sum of cell A1 + B1. I've tried all kind of options (and searched many forums) but cannot find a working solution.
It must be something like Indirect but then for function arguments.

Any help would be highly appreciated.

Many thanks up front!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
If you are going to pass a single string argument rather than two numeric arguments, parsing that out should be done inside your UDF.
 
Upvote 0
Thanks for your reply, the current function is =XFGetCell(A1, A2, A3, A4) etc.
The question is how to parse the A1, A2, A3, A4 from 1 cell into single arguments. Not sure what you mean with Parsing out inside your UDF.

Thanks again
 
Upvote 0
Are the cells you are wanting to reference always in consecutive order like that?
If so, then just like you would do:
Excel Formula:
=SUM(A1:A4)
can't you just do:
Excel Formula:
=XFGetCell(A1:A4)
(provided your function is expecting a range and not a string).
 
Upvote 0
Thanks for your reply, my function has 20 arguments and if i combine them into a cell it put double quotes around the first cell.
So default it looks like:
=XFGetCell(TRUE, "Finance",$A274, "",F$4,F$14,F$5,F$2,$C274,$D274,F$3,$B274,F$6,F$7,F$8,F$9,F$10,F$11,F$12,F$13)
But i want to populate e.g. cell B5 with:
TRUE, "Finance",$A274, "",F$4,F$14,F$5,F$2,$C274,$D274,F$3,$B274,F$6,F$7,F$8,F$9,
And then the real cell with
=XFGetCell(B5, F$10,F$11,F$12,F$13)
Keeping only the last 4 cells variable (and making the formula much smaller.
Unfortunately it doesn;t recognize the , and thus put the entire value of A1 into the first argument leaving the last 15 blank:

1646232484238.png
 
Upvote 0
This is for OneStream users only

I have a cell named Script and it has the following string E#CompName:"":C#Local:S#Budget:V#Periodic:F#Top:O#Top:I#Top:U1#AllUD1:U2#AllUD2:U3#AllUD3:U4#AllUD4:U5#AllUD5:U6#AllUD6:U7#AllUD7:U8#None
Please notice there is : as separator. Even if you use ; in your formulas

Then Use this command:
=@XFGetCellUsingScript(TRUE;$B$2;C$1;"A#"&$A9;script)

B2 is my cube and C1 is period and A9 is the account.

Regards

Ole
 
Upvote 0

Forum statistics

Threads
1,215,032
Messages
6,122,772
Members
449,095
Latest member
m_smith_solihull

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