Extract first character numbers and lengths of cell references within a formula.

guybrown

Board Regular
Joined
Jul 2, 2008
Messages
100
Hi

Is it possible to extract the first character numbers and lengths of cell references within a formula?

If I had a formula such as =A1+B23 could I get something like 2, 2, 5, 3 where 2, 2 indicates that the first cell reference starts at the 2nd character and is 2 characters long and the second cell reference starts at the 5th character and is 3 characters long?

Regards,

Guy

I am trying to go a long way about displaying the formula from within another cell but with the cell references replaced with the cell reference values. (I already have a function to extract the formula as text).
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Is it possible to extract the first character numbers and lengths of cell references within a formula?

If I had a formula such as =A1+B23 could I get something like 2, 2, 5, 3 where 2, 2 indicates that the first cell reference starts at the 2nd character and is 2 characters long and the second cell reference starts at the 5th character and is 3 characters long?
What did you want returned if the formula has absolute references in it? For example...

=A$1+$B$23
 
Upvote 0

Forum statistics

Threads
1,224,514
Messages
6,179,219
Members
452,895
Latest member
BILLING GUY

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