G
Guest
This doesn't work:
I have a city name on Stationsheet. I select the contents of the cell.
I jump to AreaCode sheet and Ctrl+F and then paste the value in the search.
Then I HOME to the leftmost cell and select it.
Then I jump back to StationSheet.
I right arrow to the third cell and I paste the areacode.
The generated code has fixed cells and ranges.
I want to have it refer to a selection on the clipboard and I want to command right arrows.
Can you help?
Sub GetAC()
'
' GetAC Macro
' Macro recorded 3/22/2004 by Clifford W. Lazar
'
' Keyboard Shortcut: Ctrl+y
'
Selection.Copy
Sheets("AreaCodes").Select
'.Select
Cells.Find(What:=selection.value, After:=Range("A1"), LookIn:=xlFormulas,
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
Range(ActiveCell).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("TVStations").Select
Range("D5").Select
ActiveSheet.Paste
Range("A6").Select
'ActiveCell
End Sub
I have a city name on Stationsheet. I select the contents of the cell.
I jump to AreaCode sheet and Ctrl+F and then paste the value in the search.
Then I HOME to the leftmost cell and select it.
Then I jump back to StationSheet.
I right arrow to the third cell and I paste the areacode.
The generated code has fixed cells and ranges.
I want to have it refer to a selection on the clipboard and I want to command right arrows.
Can you help?
Sub GetAC()
'
' GetAC Macro
' Macro recorded 3/22/2004 by Clifford W. Lazar
'
' Keyboard Shortcut: Ctrl+y
'
Selection.Copy
Sheets("AreaCodes").Select
'.Select
Cells.Find(What:=selection.value, After:=Range("A1"), LookIn:=xlFormulas,
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
Range(ActiveCell).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("TVStations").Select
Range("D5").Select
ActiveSheet.Paste
Range("A6").Select
'ActiveCell
End Sub