+ Reply to Thread
Results 1 to 3 of 3

Collection of Data from different ranges to one range

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2019
    Posts
    292

    Thumbs up Collection of Data from different ranges to one range

    Dear Masters, Salute to all of you..

    I am making daily sale report as in my sheet attached..daily i have to copy and paste down and fill it up as per my sale..

    But i also want that my this all data should go to my sheet name" My requirement" collectively without any space but date should appear infron of each day..

    Hope you will understand when you will open my sheet..

    Thanks in advance for any help..

    SAMPLE.xlsx
    Last edited by tariqnaz2005; 05-19-2011 at 11:06 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Collection of Data from different ranges to one range

    This little macro will do it for you, just click the button at the top to update the MY REQUIREMENT sheet with any new items. New items will be added to the bottom of the existing data.
    Option Explicit
    
    Sub CreateReport()
    Dim wsOut As Worksheet, NR As Long
    Dim RNG As Range, Item As Range, vFIND As Range
    
    Set wsOut = Sheets("MY REQUIREMENT")
    Set RNG = Sheets("DAILY SALE ENTRY").Range("B:B").SpecialCells(xlConstants, xlNumbers)
    NR = wsOut.Range("C" & wsOut.Rows.Count).End(xlUp).Row + 1
    
    Application.ScreenUpdating = False
    On Error Resume Next
    
    With wsOut
        For Each Item In RNG
            Set vFIND = wsOut.Range("C:C").Find(Item, LookIn:=xlValues, LookAt:=xlWhole)
            If Not vFIND Is Nothing Then
                Set vFIND = Nothing
            Else
                Item.Resize(, 7).Copy wsOut.Range("C" & NR)
                Item.End(xlToRight).End(xlUp).Copy wsOut.Range("J" & NR)
                NR = NR + 1
            End If
        Next Item
    End With
    
    Application.ScreenUpdating = True
    End Sub
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2019
    Posts
    292

    Re: Collection of Data from different ranges to one range

    Thanks a Lot dear..

    You always helping me..i have not words to thank you..God bless you

+ 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