Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine Column Number in a function
I have a function that needs to know the column number/letter of the
cell calling it. How does a novice like myself do this? Thanks. - pb |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine Column Number in a function
Function ColNum() As Integer
ColNum = Application.Caller.Column End Function Just enter =ColNum() in a cell. However, =COLUMN() does that already! "cubbybear3" wrote in message ups.com... I have a function that needs to know the column number/letter of the cell calling it. How does a novice like myself do this? Thanks. - pb |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine Column Number in a function
Here's an example of the Caller Property you would use on the application
within the custom function. Dim v as StringSelect Case TypeName(Application.Caller) Case "Range" v = CStr(Application.Caller.Column) Case Else v = "unknown" End Select MsgBox "Column number calling this function is " & v & "."-- Sincerely, Ronald R. Dodge, Jr. Master MOUS 2000 "cubbybear3" wrote in message ups.com... I have a function that needs to know the column number/letter of the cell calling it. How does a novice like myself do this? Thanks. - pb |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Determine a result of one column based on conditions in two column | Excel Discussion (Misc queries) | |||
Function that will look at letter in a column and return a number | Excel Worksheet Functions | |||
inverse of the column function? i.e. input a number, output thecorresponding column text label | Excel Worksheet Functions | |||
How do I put a variable column number in the sum() function? | Excel Worksheet Functions | |||
Determine start column/ end column of Merged Cell | Excel Programming |