+ Reply to Thread
Results 1 to 4 of 4

Union non-contiguous range

  1. #1
    Registered User
    Join Date
    01-04-2013
    Location
    dayton ohio
    MS-Off Ver
    Excel 2010
    Posts
    34

    Lightbulb Union non-contiguous range

    Folks,

    What I am trying to do here is first to get the left 10 char of range("a1") 11/01/2012 01. Then union it with data in column c. This code below not working, returns error "object required". I am guessing union needs the input to be a range?

    Any ideas?

    Sub retesting()

    check = (Left(Range("a1"), 10))


    Union(check, Range("g1").Resize(24)).Select

    End Sub
    Attached Files Attached Files

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

    Re: Union non-contiguous range

    no clue what you want to do-can you explain?
    Josie

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

  3. #3
    Registered User
    Join Date
    01-04-2013
    Location
    dayton ohio
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Union non-contiguous range

    Need the left 10 characters of the value in range a1(11/01/2012), and copy both the left 10 characters and the data in column c. I dont want to create an intermediate cell for 11/01/2012.

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Union non-contiguous range

    Hi cokillerliu

    Perhaps this
    Please Login or Register  to view this content.
    Please use Code Tags...
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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