+ Reply to Thread
Results 1 to 11 of 11

How to Combine 2 sheets Ranges

  1. #1
    Forum Contributor
    Join Date
    12-24-2005
    Posts
    104

    How to Combine 2 sheets Ranges

    Hi all,

    I am working on database workbook contained 2 sheets. Both sheets range is ("B7:N" & lastrow & "").value. (same column ranges). I am trying to combine both sheets ranges into one but could not work around.

    Please help me..... my code is below.....

    Please Login or Register  to view this content.
    Thanking you
    Last edited by internet_imran; 11-02-2017 at 02:12 PM.

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: How to Combine 2 sheets Ranges

    What are you trying to do?
    - simply copy one range below the other?
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Forum Contributor
    Join Date
    12-24-2005
    Posts
    104

    Re: How to Combine 2 sheets Ranges

    Thank you very much Kev
    working around this code will be copy column data of sheet 1 & sheet 2 and paste to sheet 3.

  4. #4
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: How to Combine 2 sheets Ranges

    Test in attached workbook
    - there are values in sheet1 & sheet2
    - run the macro with {CTRL} k
    - this copies the values to sheet 3

    Does it do what you want?

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    12-24-2005
    Posts
    104

    Re: How to Combine 2 sheets Ranges

    Sir, thank you
    may be I cannot clear the concept mentioned in the above code. please find attached sample file.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: How to Combine 2 sheets Ranges

    You did not explain your problem accurately in post#1
    - you are not wanting to combine ranges on 2 sheets
    - you are wanting to take 2 lists of journalled transactions and create an old fashioned double-entry ledger (where the shape of the data needs to change significantly)

    Your 2 original worksheets are badly designed
    - lots of merged cells
    - lines without dates
    - lines with descritions but transactions on previous line
    etc....
    - this is not real data - it is much too simplistic
    - perhaps it was pasted in from a college exercise?

    I will still help you - BUT this looks like college coursework - am I correct?
    Last edited by kev_; 11-03-2017 at 04:50 AM.

  7. #7
    Forum Contributor
    Join Date
    12-24-2005
    Posts
    104

    Re: How to Combine 2 sheets Ranges

    Thank you very much ....
    - this is a sample workbook and not real data...
    - my office data is different but work around this code, So firstly I try myself .....
    - I try to combine the ranges as i explain in my first post. I also searched on the different website. The code in this sample workbook is good but worked out only the single sheet either sheet No.1 or sheet2 but not both sheets together.
    Please look out the code existed in the sample workbook.
    Last edited by internet_imran; 11-03-2017 at 05:04 AM.

  8. #8
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: How to Combine 2 sheets Ranges

    If this is Sample data - why have you formatted it in this way?

    Bad and Better.jpg
    Last edited by kev_; 11-03-2017 at 05:21 AM.

  9. #9
    Forum Contributor
    Join Date
    12-24-2005
    Posts
    104

    Re: How to Combine 2 sheets Ranges

    sir thank you!!!! code existed in the sample workbook is correct but only change is required in the following line ........
    Please Login or Register  to view this content.
    If the above range is combined efficiently, my problem will be solved. please look out again the sheet Ledger which I update it manually.
    Ledger sheet is my requirement.

    Imran

  10. #10
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: How to Combine 2 sheets Ranges

    An easier way to combine your 2 ranges is to place ALL values directly into a ONE array

    Test in attached workbook with {CTRL} k
    - values from array are printed to sheet TEST

    Note
    - range rows are counted (they vary and differ from each other)
    - range columns B:N = 13 EVERT TIME

    Please Login or Register  to view this content.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    12-24-2005
    Posts
    104

    Re: How to Combine 2 sheets Ranges

    Sir thank you very much, suggested solution provided by you is very beneficial for me.

    - one more question about post # 8 https://www.excelforum.com/excel-pro...ml#post4777134 in which you have asked to change the format.

    - Please provide me the solution to change the Ledger format based on database format.

    Imran

+ 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] Combine multiple ranges from different sheets
    By billj in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-28-2017, 05:28 AM
  2. How to combine dynamic ranges from multiple sheets into one list?
    By mst3k in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-07-2015, 03:25 AM
  3. [SOLVED] Combine 2 Ranges into 1
    By Jonathan78 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 05-06-2015, 03:32 AM
  4. Using Union to combine ranges in VBA
    By sksachdev in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-27-2014, 06:59 AM
  5. Combine Named Ranges
    By mycon73 in forum Excel General
    Replies: 4
    Last Post: 07-17-2011, 05:21 AM
  6. Help Combine Ranges
    By jmitch26 in forum Excel General
    Replies: 1
    Last Post: 11-15-2010, 03:49 AM
  7. Combine two ranges into one
    By hodges5378 in forum Excel General
    Replies: 5
    Last Post: 04-22-2008, 02:03 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