Mar 8, 2007 #1 markozzz IS-IT--Management Joined Feb 22, 2007 Messages 6 Location NO Hi, I couldnt figure this out.. In this sentence: Code: ...Sheets("Sheet1").Range("G:J"), 4, False) in .Range("G:J") i would like "G" to be a variable. Like .Range("(Var),J").. But that obviously doesnt work. Help please? Rgds, Markozzz
Hi, I couldnt figure this out.. In this sentence: Code: ...Sheets("Sheet1").Range("G:J"), 4, False) in .Range("G:J") i would like "G" to be a variable. Like .Range("(Var),J").. But that obviously doesnt work. Help please? Rgds, Markozzz
Mar 8, 2007 #2 S SkipVought Programmer Joined Dec 4, 2001 Messages 47,492 Location US Hi, Take a look at the Cells property of range... Code: Sheets("Sheet1").Range("G:J") iCol1 = Cells(1, "G").column iCol2 = Cells(1, "J").column Sheets("Sheet1").Range(Cells(1,iCol1), Cells(1,iCol2)).entirecolumn Skip, [red][/red] Upvote 0 Downvote
Hi, Take a look at the Cells property of range... Code: Sheets("Sheet1").Range("G:J") iCol1 = Cells(1, "G").column iCol2 = Cells(1, "J").column Sheets("Sheet1").Range(Cells(1,iCol1), Cells(1,iCol2)).entirecolumn Skip, [red][/red]
Mar 8, 2007 #3 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR You may try this: .Range(Var & ":J") Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
You may try this: .Range(Var & ":J") Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Mar 8, 2007 Thread starter #4 markozzz IS-IT--Management Joined Feb 22, 2007 Messages 6 Location NO Thank you both! I used PHV`s method, but im sure it both works. Rgds, markozz Upvote 0 Downvote