+ Reply to Thread
Results 1 to 19 of 19

match data between two sheets based on names and auto fill

  1. #1
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    758

    match data between two sheets based on names and auto fill

    hello
    I have data in sheet main for some customers so what I want match the names are existed in sheet orginal with sheet main then bring all of data for each name . so I put the result in sheet RESULT and see the sheet orginal how data was
    thanks
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    758

    Re: match data between two sheets based on names and auto fill

    for more explenation . it should show result in sheet orginal , but I put the result in sheet result to understand how the data were before
    so it should match the names in sheet MAIN in col B with sheet ORGINAL with COL C then should brings all of data for each name .
    if any thing is missed please tell me .
    any help I truly appreciate .

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Hi ! Try this …


    According to your attachment a good enough readers only VBA demonstration for starters to paste to the ORGINAL worksheet module :

    PHP Code: 
    Sub Demo1()
        
    Dim F&, N$, VR&, L&, S$
            
    1
            UsedRange
    .Clear
            Application
    .ScreenUpdating False
        With Sheets
    ("MAIN").[A1].CurrentRegion
           
    .Columns(2).AdvancedFilter 2, , .Range("K1"), True
            N 
    = .Range("G2").NumberFormat
            V 
    = .Range("K1").CurrentRegion.Value2
        
    For 2 To UBound(V)
           .
    Range("K2").Value2 V(R1)
           .
    AdvancedFilter 2, .Range("K1:K2"), Cells(F1)
            
    Cells(F1).End(xlDown).Row 1
            Rows
    (L).Range("F1:H1").NumberFormat N
            S 
    "=SUM(R[" "]C:R[-1]C)"
            
    Rows(L).Range("E1:H1").HorizontalAlignment xlCenter
            Rows
    (L).Range("E1:I1").Font.Size 13
            Rows
    (L).Range("E1:I1").FormulaR1C1 = Array("Total"SS"=RC[-2]-RC[-1]""Balance")
            
    3
        Next
           
    .Range("K1").CurrentRegion.Clear
        End With
            Application
    .ScreenUpdating True
    End Sub 
    ► Do you like it ? ► So thanks to click on bottom left star icon « Add Reputation » !

  4. #4
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    758

    Re: match data between two sheets based on names and auto fill

    thank for your trying , but unfortunately this is not what I want. see what I got after run the code
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: match data between two sheets based on names and auto fill

    Please Login or Register  to view this content.
    Last edited by jindon; 07-20-2021 at 10:19 AM. Reason: missed heading for balance.

  6. #6
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    758

    Re: match data between two sheets based on names and auto fill

    @Jindon it's very awesome ! just I ask about the formula . is there any way after calculate the values hide the formulas just show as a value . the formulas are existed in col B,C,D,H

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: match data between two sheets based on names and auto fill

    Try add one line in bold
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    758

    Re: match data between two sheets based on names and auto fill

    @jindon fantastic ! thanks so much for your excellent code

  9. #9
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: match data between two sheets based on names and auto fill

    Apologies...My code resulted in initial result as per first sample file Result Sheet
    Attached Files Attached Files
    Last edited by Sintek; 07-20-2021 at 09:58 AM.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: match data between two sheets based on names and auto fill

    ABDELFATTA

    Just edited the code in #5 and you will see ITEM in col.A.

  11. #11
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    758

    Re: match data between two sheets based on names and auto fill

    @sintek well don ! but I no know if you note the code delet theses cells above for each name (NAME,DEBIT,CREDIT)
    and the name should fill

  12. #12
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    758

    Re: match data between two sheets based on names and auto fill

    @Jindon I forgot mentioned the name should fill , sorry I don't mentioned that in my original post
    I'm talking about above for each customer .it contains total for debit,credit, balance if you note see there is name . it should fill
    Last edited by ABDELFATTA; 07-20-2021 at 10:13 AM.

  13. #13
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: match data between two sheets based on names and auto fill

    Quote Originally Posted by ABDELFATTA View Post
    @sintek well don ! but I no know if you note the code delet theses cells above for each name (NAME,DEBIT,CREDIT)
    and the name should fill
    As I mentioned...I thought you wanted the result as per Sheets("result") in your first upload...



    Untitled.png

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: match data between two sheets based on names and auto fill

    Code in #5 has been updated.

  15. #15
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    758

    Re: match data between two sheets based on names and auto fill

    @sintek please scroll the arrow you will see all the data

  16. #16
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    758

    Re: match data between two sheets based on names and auto fill

    @jindon the highlighted cell should fill the name . I admit this my mistake
    may yo see the attached file ,please?
    Attached Files Attached Files

  17. #17
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: match data between two sheets based on names and auto fill

    Quote Originally Posted by ABDELFATTA View Post
    @sintek please scroll the arrow you will see all the data
    Oh...lol, I missed that...my bad...Well you have solution now by jindon...

  18. #18
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    758

    Re: match data between two sheets based on names and auto fill

    @jindon thanks so much
    it works perfectly

  19. #19
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: match data between two sheets based on names and auto fill


    Quote Originally Posted by ABDELFATTA View Post
    thank for your trying , but unfortunately this is not what I want. see what I got after run the code
    I well know the result as I removed the useless ! And just for starters, so you can try to mod it …

+ 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. Auto fill cell in different sheets, based on a check box.
    By ben83 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2016, 04:09 PM
  2. Auto fill date into multiple sheets based on main sheet
    By lawrence24 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2014, 08:53 AM
  3. Replies: 1
    Last Post: 09-21-2014, 10:23 AM
  4. [SOLVED] Auto Fill Secondary Sheets from Master Sheet based on values in a colum
    By hfcamper in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-26-2013, 09:04 AM
  5. [SOLVED] Auto copy fill based cell match?
    By synses in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-31-2013, 04:12 PM
  6. Auto fill data from multiple sheets
    By Highmark429 in forum Excel General
    Replies: 3
    Last Post: 03-11-2012, 08:50 AM
  7. [SOLVED] Auto-Fill names based on a Validation?
    By aiwnjoo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-28-2010, 01:01 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