View Single Post
 
Old 04-17-2018, 03:33 AM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2010 32bit
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

It is, but do you have to do it before the formula is committed to the sheet?
You could examine the formula directly after committing it to the sheet using a Worksheet_Change event. This in the sheet concerned's code-module:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
myString = Target.Formula
MsgBox myString
If UCase(Left(myString, 5)) = "=SUM(" Then
  strRng = Split(Split(myString, "(")(1), ")")(0)
  MsgBox strRng
End If
End Sub
Not very robust but with a few more IFs perhaps could be made to do what you want.

Last edited by p45cal; 04-17-2018 at 04:36 PM.
Reply With Quote