SOLVED

Fetch formula from cell (or dropdown box)

%3CLINGO-SUB%20id%3D%22lingo-sub-2081069%22%20slang%3D%22en-US%22%3EFetch%20formula%20from%20cell%20(or%20dropdown%20box)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2081069%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20table%20with%20a%20calculation%2C%20and%20would%20like%20to%20easily%20switch%20formulas.%3C%2FP%3E%3CP%3ESo%20I'd%20have%20a%20list%20of%20formulas%20next%20to%20the%20table%2C%20and%20with%20a%20dropdown%20box%2C%20would%20like%20to%20let%20the%20user%20choose%20which%20formula%20is%20used%20in%20the%20table.%3C%2FP%3E%3CP%3EAttached%20a%20simple%20example%20of%20the%20concept%20(screenshot%20below).%20The%20formula%20in%20the%20column%20%22Result%22%20should%20adapt%20to%20the%20selection%20in%20a%20dropbox%2C%20which%20would%20show%20Formula1%2C%20Formula2%2C%20etc.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22bartvana_0-1611208542490.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F247932i216149EBFD4048F5%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22bartvana_0-1611208542490.png%22%20alt%3D%22bartvana_0-1611208542490.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2081069%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2081113%22%20slang%3D%22en-US%22%3ERe%3A%20Fetch%20formula%20from%20cell%20(or%20dropdown%20box)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2081113%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F863782%22%20target%3D%22_blank%22%3E%40bartvana%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20could%20do%20it%20using%20IF%2C%20IFS%2C%20or%20perhaps%20SWITCH%20depending%20on%20how%20many%20formulas%20you%20plan%20to%20have.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20could%20also%20try%20the%20Evaluate%20function%2C%20which%20only%20works%20as%20a%20named%20formula%20in%20the%20name%20manager%20(attached).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2081311%22%20slang%3D%22en-US%22%3ERe%3A%20Fetch%20formula%20from%20cell%20(or%20dropdown%20box)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2081311%22%20slang%3D%22en-US%22%3E%3CP%3EGreat%2C%20thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

I have a table with a calculation, and would like to easily switch formulas.

So I'd have a list of formulas next to the table, and with a dropdown box, would like to let the user choose which formula is used in the table.

Attached a simple example of the concept (screenshot below). The formula in the column "Result" should adapt to the selection in a dropbox, which would show Formula1, Formula2, etc.

bartvana_0-1611208542490.png

 

3 Replies
Best Response confirmed by bartvana (Contributor)
Solution

@bartvana 

 

You could do it using IF, IFS, or perhaps SWITCH depending on how many formulas you plan to have.

 

You could also try the Evaluate function, which only works as a named formula in the name manager (attached).

Great, thanks!

You're welcome.