Is there a Way to Find the Cell Row and Column From my UDF

K

kylancal

Basically i have a UDF in a module that is just

public function whatCellAMI() as string
WhatCellAMI = "Row: " & RowFunction & " Column: " & ColumnFunction

end function

Where RowFunction and ColumnFuncion are some way to find out the row
and column of the cell from which this function is being called. So if
it is Called in cell B4 it would say
"Row: 4 Column 2"

Does anyone know how to do this? THanks alot

Cal
 
B

Bob Phillips

Public Function whatCellAMI() As String
With Application.ThisCell
whatCellAMI = "Row: " & .Row & " Column: " & .Column
End With
End Function



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top