+ Reply to Thread
Results 1 to 5 of 5

Union Method

  1. #1
    Registered User
    Join Date
    02-22-2018
    Location
    Ankara Turkey
    MS-Off Ver
    2013
    Posts
    4

    Angry Union Method

    Sorry, My english is bad. What is the problem in below codes;

    Sub satirsec()
    On Error Resume Next
    For i = 2 To 100 Step 2
    If bolge.Address = Empty Then
    Set bolge = Cells(i, 1)
    Else
    Set bolge = Application.Union(Range(bolge.Address), Range(Cells(i, 1).Address))
    End If
    Next i
    Range(bolge.Address).EntireRow.Select
    End Sub

  2. #2
    Registered User
    Join Date
    02-22-2018
    Location
    Ankara Turkey
    MS-Off Ver
    2013
    Posts
    4

    Re: Union Method

    My other codes...

    2...66 rows selected after stop

    Sub satirsec()
    Dim erd()
    say = -1
    For i = 2 To 1500 Step 2
    say = say + 1
    ReDim Preserve erd(say)
    erd(say) = Cells(i, 1).Address(False, False)
    Next i

    For a = 0 To UBound(erd)
    If a = 0 Then
    Set kelebek = Range(erd(a)).EntireRow
    Else
    Set kelebek = Union(Range(kelebek.Address), Range(erd(a)).EntireRow)
    End If
    Next a
    Range(kelebek.Address).Select
    End Sub

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Union Method

    I'm sorry but that code Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    02-22-2018
    Location
    Ankara Turkey
    MS-Off Ver
    2013
    Posts
    4

    Re: Union Method

    Excuse me...

    Sorry, My english is bad. What is the problem in below codes;

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-22-2018
    Location
    Ankara Turkey
    MS-Off Ver
    2013
    Posts
    4

    Re: Union Method

    My other codes...

    2...66 rows selected after stop

    Please Login or Register  to view this content.
    Last edited by enemy; 02-22-2018 at 06:22 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Excel/VBA code--odd treatment of Union Method
    By Alan Beban in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-06-2017, 02:55 AM
  2. Union Method -how to best use it
    By bmathfun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-19-2016, 09:58 PM
  3. Help me to print a range before the other in a Union method.
    By OFUENT13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-19-2012, 05:03 PM
  4. Setting Ranges With Union Method
    By Preston900 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2008, 09:17 AM
  5. [SOLVED] Union Method
    By Noah in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2006, 10:45 AM
  6. [SOLVED] RE: Union Method
    By Gary''s Student in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-03-2006, 07:40 AM
  7. [SOLVED] Union method for Range Object
    By Chad in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-10-2005, 04:06 PM

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