Why R/T 438?

jim may

Well-known Member
Joined
Jul 4, 2004
Messages
7,486
Rich (BB code):
Sub Foo()
Dim MyRow As Integer, MyColNum As Integer
Dim MyColLtr As String
MyValue = InputBox("Enter text value")
    For Each C In Range("Rng")
        If C.Row > 1 And C.Column > 1 Then
            If MyValue = C Then
                MyRow = C.Row
                MyColNum = C.Column
                MyColLtr = Application.WorksheetFunction.Address(MyRow, MyColNum, 4)
            ActiveCell.Value = "Row " & MyRow & " and Column " & MyColLtr
            Exit Sub
            End If
        End If
    Next C
End Sub
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Couldn't post one earlier but why not.:)
Code:
MyColLtr = Mid(Replace(Cells(1, MyColNum).Address, "$1", ""), 2)
 
Upvote 0
Couldn't post one earlier but why not.:)
Code:
MyColLtr = Mid(Replace(Cells(1, MyColNum).Address, "$1", ""), 2)
That would work fine as would...

Code:
MyColLtr = Replace(Replace(Cells(1, MyColNum).Address, "$1", ""), "$", "")
and, perhaps, a dozen other such string manipulation methods.
 
Upvote 0
No problem, and apologies for the spelling/punctuation/grammar.:)
 
Upvote 0

Forum statistics

Threads
1,224,551
Messages
6,179,476
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top