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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to range a cell having the column variable

Status
Not open for further replies.

5641234

Technical User
Dec 5, 2005
2
AT
Hi, hopefully i do describe the problem good enough in english..

heres what i have so far..

Application.Goto Reference:="_Meetings"
Application.CutCopyMode = False
Selection.Copy
Sheets("Targets").Select
Range("P77").Select
Application.Run "Pickup_HVP.xls!paste_value"
Sheets("PlanValuesCopy").Select


Application.Goto Reference:="_Non_Tour"
Application.CutCopyMode = False
Selection.Copy
Sheets("Targets").Select
Range("P9").Select
Application.Run "Pickup_HVP.xls!paste_value"
Sheets("PlanValuesCopy").Select

etc.. etc.

now as the number of the row is always the same 9 and 72, there is no problem..
but how can I define what "P" is.. ?

or in other words how can i make "P" to a variable
i would be pleased for a helpful reply!
 
Something like this ?
myVar = "P"
Range(myVar & "9").Select

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 

Hi,
Code:
    vCol = InputBox("What Column")
    Application.Goto Reference:="_Meetings"
    Application.CutCopyMode = False
    Selection.Copy Sheets("Targets").Cells(77, vCol)
    
    
    Application.Goto Reference:="_Non_Tour"
    Application.CutCopyMode = False
    Selection.Copy Sheets("Targets").Cells(9, vCol)

Skip,

[glasses] [red]Be Advised![/red]
The band of elderly oriental musicians, known as Ground Cover, is, in reality...
Asian Jasmine![tongue]
 
skipvought,

thank you! that works brilliant!

you saved me hours of work time!

-------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top