Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combine known column and row based on cell contents VBA

Status
Not open for further replies.

4thorns

Structural
Joined
Jan 22, 2009
Messages
152
Location
US
Hi All.

This seems like it should be easy and I know I've done something similar in the past.

Sub ScrollToName()
Dim RN As Integer
RN = Range("P5").Value
ActiveWindow.ScrollRow = RN
[highlight #FCE94F]Range("E + RN").Select[/highlight]
End Sub

It scrolls to the top perfectly but I can't seem to get it to select the cell I want it to.
Obviously I'm missing something.

Thanks, Doug
 
Figured it out 20 seconds later. "+" = addition.

Range("E" [highlight #8AE234]&[/highlight] RN).Select

Works perfect.
 
Code:
Sub ScrollToName()
   Cells(Cells(5, "P").Value, "E").Select
End Sub

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top