Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 3 of 3

Thread: [Solved] VBA: syntax for range.select using variable

  1. #1
    Join Date
    21st October 2003
    Posts
    9
    My code is below.

    I have used
    Range("I"&Row1).Select
    now I want to select a range from ("I"&Row1) to ("P"&Row1)

    but i can't get the syntax right. can anyone help.

    >>>>>>>

    Row1 = Worksheets("UMBRELLA FORM").Range("AF96")

    Sheets("UMBRELLA FORM").Select
    Range("U96:AD96").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Expenses").Select
    Range("I:P" & Row1).Select
    ActiveSheet.Paste
    Application.CutCopyMode = False

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    21st October 2003
    Posts
    9

  3. #3
    Join Date
    30th January 2003
    Posts
    188
    Just for giggles I am partial to using
    cells function

    Cells(1,1)

    range(cells(1,1),cells(10,1))

    Variables can replace any of the numbers

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Select Range With Variable Row
    By googlebot in forum EXCEL HELP
    Replies: 2
    Last Post: May 30th, 2008, 10:08
  2. Select Range With Row Variable
    By ExcelChicky in forum EXCEL HELP
    Replies: 5
    Last Post: December 11th, 2007, 08:26
  3. Select Variable Range
    By JTate in forum EXCEL HELP
    Replies: 7
    Last Post: July 10th, 2007, 03:07
  4. Select Range, With Variable, At Random
    By inkexit in forum EXCEL HELP
    Replies: 2
    Last Post: November 19th, 2006, 03:28
  5. Select Variable Range
    By dunno in forum EXCEL HELP
    Replies: 1
    Last Post: November 1st, 2006, 12:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
porno