View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default covert only cell references in selected cells into value leaving the existingcell formula

aL,

I'm not sure what you mean. Post an example of "before and after".

HTH,
Bernie
MS Excel MVP


"al007" wrote in message
oups.com...
Bernie,
For a long time I've been trying to split the cell ref in a formula
cell into individual cells. I'm thinking of using the first part of
your code & adding the other part which would split text to column
using delimited & spliting the cell as per below:


Sub Split()



Dim strForm As String
Dim strOrig As String
Dim Addr As Variant
Dim i As Integer
Dim myCell As Range
Dim mySel As Range
Const Operators As String = "=+-*/^()"

For Each mySel In Selection
strForm = mySel.Formula
strOrig = mySel.Formula

For i = 1 To Len(Operators)
strForm = Replace(strForm, Mid(Operators, i, 1), "@=")
Next i
' need additional code which would split the cell - delimited & split at all @ - so that I
have all referenced cells in individual cells next to the cell containing the formula.


I think I'm on the right track - but I need your help.

Thxs
aL