AFORMULATEXT

=AFORMULATEXT(Reference)

Reference
Required. Cell or range reference to display formulas

AFORMULATEXT improves FORMULATEXT and returns a cell's formula as well as the cell's address or a message for non-formula cells.

schardt679

Board Regular
Joined
Mar 27, 2021
Messages
58
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
AFORMULATEXT improves FORMULATEXT and returns a cell's formula as well as the cell's address or a message for non-formula cells.
Reference can be a single cell or an array of cells, despite what FORMULATEXT says (it says only upper-left most cell is used)

Excel Formula:
=LAMBDA(Reference,
      LET(Ref, Reference,    
          RefRow, ROW(Ref),    
          RefCol, COLUMN(Ref),    
          RefAdd, ADDRESS(RefRow, RefCol, 4),
          NoFormMSG, "No formula",    
          Result, "Formula in cell "&RefAdd&"☛ "&FORMULATEXT(Ref),
          Return, IFNA(Result, NoFormMSG),
          Return
      )
  )
LAMBDA Examples.xlsx
ABCDEFGH
1AFORMULATEXT
2
3TestPossible PointsYour ScoreAverage
4Test 110010091.67
5Test 210080
6Midterm10080
7Test 3100100
8Test 410090
9Final100100
10
11Formula in cell F4☛ =AVERAGE(D4#)
12
13
14
15TestPossible PointsYour ScorePercentageFuntionValue
16Test 1504488.00%Min:75.00%
17Test 2504182.00%Max:98.00%
18Midterm1007575.00%Mean:86.67%
19Test 3504998.00%Overall Grade:85.75%
20Test 4504386.00%
21Final1009191.00%
22Total:400343
23
24Formula in cell G16☛ =MIN(E16#)
25Formula in cell G17☛ =MAX(E16#)
26Formula in cell G18☛ =AVERAGE(E16#)
27Formula in cell G19☛ =SUM(D22)/SUM(C22)
28
29
30
31Value 1Value 2
321A
332#VALUE!
344
35
36No formulaNo formula
37Formula in cell B33☛ =B32+1Formula in cell C33☛ =C32+1
38Formula in cell B34☛ =B33*2No formula
39
AFORMULATEXT
Cell Formulas
RangeFormula
C4:C9C4=SEQUENCE(ROWS(B4:B9),, 100, 0)
D4:D9D4=RANDARRAY(ROWS(B4:B9),, 75, 100, 1)
F4F4=AVERAGE(D4#)
B11B11=AFORMULATEXT(F4)
E16:E21E16=D16:D21/C16:C21
G16G16=MIN(E16#)
G17G17=MAX(E16#)
G18G18=AVERAGE(E16#)
G19G19=SUM(D22)/SUM(C22)
D16:D21D16=RANDBETWEEN(0.75*C16, C16)
C22:D22C22=SUM(C16:C21)
B24:B27B24=AFORMULATEXT(G16:G19)
B33:C33C33=C32+1
B34B34=B33*2
B36:C38B36=AFORMULATEXT(B32:C34)
Dynamic array formulas.
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,215,223
Messages
6,123,714
Members
449,118
Latest member
MichealRed

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