+ Reply to Thread
Results 1 to 6 of 6

is it possible to merge the to line in one

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    is it possible to merge the to line in one

    Well, I have this piece of code
    Is it possible to to populate the ranges from the array in one go rather than tow
                   [ With Sheets(e)
                        x = 1
                        For Each myArea In .Columns(1).SpecialCells(2, 1).Areas
                            n = myArea.Count
    
    
                            myArea.Offset(, 1).Resize(n, 1).FormulaR1C1 = Application.IfError _
                                                                          (Application.Index(w, Evaluate("row(" & x & ":" & _
                                                                                                       x + n - 1 & ")"), Evaluate("column(" & [b1].Resize(, 1).Address & ")")), "")
                            myArea.Offset(, 3).Resize(n, 2).FormulaR1C1 = Application.IfError _
                                                                          (Application.Index(w, Evaluate("row(" & x & ":" & _
                                                                                                       x + n - 1 & ")"), Evaluate("column(" & [d1].Resize(, 2).Address & ")")), "")
    
    
                            x = x + 20
                        Next
    
                    End With

    Thank you in advance
    Last edited by mohadin; 06-20-2019 at 09:19 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,620

    Re: is it possible to merge the to line in one

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [CODE] [/CODE] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I added the tags for you this time

  3. #3
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: is it possible to merge the to line in one

    Thank you very much in deed
    Next Time would be OK
    sorry

  4. #4
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: is it possible to merge the to line in one

    Nop? does it mean no way?

  5. #5
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: is it possible to merge the to line in one

    Well,
    let me put it this way:
    In the attached file there is 2 sheets
    and we have the source sheet contents in an array(some how)
    now, how to pass the contents of this array to the result sheet except the column "e"
    the issue here id avoid loop
    this is Mr. jndon idea (pass array to range with no loop)
    thanks for your time
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: is it possible to merge the to line in one

    so...
    there is no way but the #1 you recon?

+ 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] Mail merge - capitalising last line of address
    By AlexnL12 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-22-2016, 09:06 AM
  2. How to merge four line graphs with each two drawn in different scales
    By Bhim Chaulagain in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-20-2015, 03:59 PM
  3. Merge Row into One Cell with Line Break
    By Jetheat in forum Excel General
    Replies: 13
    Last Post: 03-11-2009, 07:27 AM
  4. add new line, merge two tables
    By mechant in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-12-2008, 09:23 AM
  5. mail merge document with a line graph
    By pmdavis_77 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 07-26-2005, 04:05 PM
  6. Merge and line break added.. How To?
    By amiart in forum Excel General
    Replies: 1
    Last Post: 04-12-2005, 04:06 PM
  7. Replies: 3
    Last Post: 04-11-2005, 05: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