View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Evalution of a cell-entry

Here is a VBA function that does what you seem to want. In T90 enter
=WHATCOL(S90)
Note that I have allowed only for references up to column Z. Do you need to
be concerned with reference like = AB12 ?

If you are unfamiliar with VBA start by reading David McRitchie's site on
"getting started" with VBA

http://www.mvps.org/dmcritchie/excel/getstarted.htm

Function whatcol(mycell)
myform = Mid(mycell.Formula, 2, 1)
mycol = Mid(mycell.Address(False, False), 1, 1)
Debug.Print myform; mycol

If myform < mycol Then
whatcol = "Less"
ElseIf myform = mycol Then
whatcol = "Equal"
Else
whatcol = "More"
End If
End Function

BTW: why begin the formula (+M20) with + rather that = ? Are you an old
Lotus user?
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Gilbert DE CEULAER" wrote in message
...
Cell M20 contains "Whatever".
Cell S90 contains "+M20"
In order to verify things, in T90, I want to know the row, column, or
address of what is really in S90, I mean I want "M20", not the contents
("Whatever").
How can I do that ?
(Actually, in T90? I want to make a formula checking whether the
column-number mentioned in S90 ("M"=13) is less, equal or greater than the
column-number of S90 itself ("S"=19)).