I have a macro, which I want to run on all the sheets of my workbook. The code is pasted below:
Also I have a problem, I need the macro to display to me the value of the row,column value I am selecting, but its not doing the same. Please find the macro and advise...I need to do this program asap...
Also I have a problem, I need the macro to display to me the value of the row,column value I am selecting, but its not doing the same. Please find the macro and advise...I need to do this program asap...
Code:
Sub FindAddressColumn()
Dim rngAddress As Range
Set rngAddress = Range("A1:A10").Find("south")
Range(rngAddress, rngAddress.End(xlToRight)).Select
myRow = ActiveCell.row
MsgBox myRow
Dim rngAddress0 As Range
Set rngAddress0 = Range("A1:Z1").Find("rt3")
Range(rngAddress0, rngAddress0.End(xlDown)).Select
col1 = Split(ActiveCell(1).Address(1, 0), "$")(0)
MsgBox col1
Dim cellval As String
cellval = GetValue(row:=myRow, col:=col1)
MsgBox (cellval)
End Sub
Function GetValue(row As Integer, col As String)
GetValue = ActiveSheet.Cells(row, col)
End Function
Last edited by a moderator: