+ Reply to Thread
Results 1 to 5 of 5

Non Contiguous range of cells identified only at run time

  1. #1
    Registered User
    Join Date
    03-13-2013
    Location
    Exeter
    MS-Off Ver
    Excel 2010
    Posts
    4

    Exclamation Non Contiguous range of cells identified only at run time

    Ok so I would like to define all the points in the vba but they aren't next to each other.

    range("A1").select
    selection.end(xltoright).select
    endcol = selection.column
    otherrow (This is determined by earlier code)
    select information in row 1 from col 1 to endcol and information in otherrow to endcol

    Hope this makes sense thanks for your help

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Non Contiguous range of cells identified only at run time

    what is otherrow? a row number or cell or an entire row?
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    03-13-2013
    Location
    Exeter
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Non Contiguous range of cells identified only at run time

    The other row is a loop I go down a row so it will send the row number to the variable otherrow and then row 1 to endcol and otherrow 1 to endcol need to be selected.

    eg first time through the selection might be range("A1:A10, C1:C10") next time range("a1:a10,e1:e10")

    Thank you for your help
    Last edited by EmmaEmu; 03-13-2013 at 10:43 AM.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,437

    Re: Non Contiguous range of cells identified only at run time

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Registered User
    Join Date
    03-13-2013
    Location
    Exeter
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Non Contiguous range of cells identified only at run time

    Thank you - Worked

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1