I'm trying to use the following code
VB Code:
Range("A"&Select1&":BW"Select1&",A8:BW8")
Where Select1 is an integer, But i cant get it to work can anyone help.
Printable View
I'm trying to use the following code
VB Code:
Range("A"&Select1&":BW"Select1&",A8:BW8")
Where Select1 is an integer, But i cant get it to work can anyone help.
You were missing an Ampersand and the comma should not be in the last range.
VB Code:
Range("A" & Select1 & ":BW" & Select1 , "A8:BW8")
Untested...but it should work :)
Hi,Quote:
Originally Posted by Pearso
You missed the "&" as marked in blue color font in the following code. And also give space between words, variables, etc. If you want to select that range, you need to use the following code:
For example, If the value of select1 is 5 it will select "A5 to BW5" and "A8 to BW8".VB Code:
Range("A" & select1 & ":BW" [COLOR=Blue]&[/COLOR] select1 & ", A8:BW8").Select
Always give space between variables, ambersand, strings etc.
________________
CS.
Thanks,
It always helps to have a second set of eyes look gs.