+ Reply to Thread
Results 1 to 21 of 21

Merge partial character before specific word across sheets based on headers

  1. #1
    Registered User
    Join Date
    02-21-2024
    Location
    africa
    MS-Off Ver
    2010
    Posts
    48

    Merge partial character before specific word across sheets based on headers

    Hi,
    I want merge data based on matching headers across sheets .
    if the cells B4,C4 are empty then should match header(DETAILES) and merge amounts for column TOTAL based on partial character before word "NO"
    if the cells B4,C4 are DATES then should match headers(DATE,DETAILES) and merge amounts for column TOTAL based on before word "NO"
    as you see the structure for each sheet is not the same . so that's why I would match headers.
    so the result will be in RESULT sheet based on what I put it if dates in DATES sheet and if there is no date in WITHOUT DATES sheet.
    in row 7 will be headers from column C based on sheets names and will merge based on two cases as I mentioned also insert total row to sum each column .
    I would macro to deal with big data for each sheet , I will add new sheets every time before RESULT sheet . so before bring report should delete data in RESULT sheet.
    also posted here
    https://www.mrexcel.com/board/thread.../#post-6204828
    Attached Files Attached Files
    Last edited by Amer omar; 08-07-2024 at 04:48 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,293

    Re: Merge partial character before specific word across sheets based on headers

    A formula solution .....

    in H8 of DATES

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See attached: sample results in G:J of "DATES"

    INDIRECT could be used to match headers in C7:F7 but if these are constant then using the fixed sheet names will suffice.

    Numbers will automatically refresh as input sheets are updated but if this is a problem then VBA is the option (as you requested!)

    NOTE: some dates in "SALES" are mis-typed!
    Attached Files Attached Files
    Last edited by JohnTopley; 08-05-2024 at 02:09 AM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    02-21-2024
    Location
    africa
    MS-Off Ver
    2010
    Posts
    48

    Re: Merge partial character before specific word across sheets based on headers

    thanks
    I'm not sure if you read well my post !
    should create the whole report in RESULT sheet .
    did you see the RESULT sheet ?
    the only thing is existed dates so should create the whole report without interfere from me.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,919

    Re: Merge partial character before specific word across sheets based on headers

    @Amer omar

    This is not the first time that you have addressed someone trying to help you in a disparaging tone. If you wish to continue being allowed to get help here, this must STOP.

    Thank you.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,293

    Re: Merge partial character before specific word across sheets based on headers

    The "Dates" sheet was purely used as an example (for testing) but I will now leave it to others as you evidently find it too onerous to transfer the formulae to RESULT sheet!

  6. #6
    Registered User
    Join Date
    02-21-2024
    Location
    africa
    MS-Off Ver
    2010
    Posts
    48

    Re: Merge partial character before specific word across sheets based on headers

    This is not the first time that you have addressed someone trying to help you in a disparaging tone
    just I wanted to clarify what's my requirements , sorry !

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,919

    Re: Merge partial character before specific word across sheets based on headers

    The tone of this:

    Please Login or Register  to view this content.
    and of some comments in earlier threads by you is not very polite. You seem to be accusing your helper of incompetence. It may be that your first language is not English, so you are unaware of how this comes across. You can look up the word 'dosparaging' online.

    Thank you for modifying your tone to make it less critical. Thank you.

  8. #8
    Registered User
    Join Date
    02-21-2024
    Location
    africa
    MS-Off Ver
    2010
    Posts
    48

    Re: Merge partial character before specific word across sheets based on headers

    and of some comments in earlier threads by you is not very polite
    sorry about it !
    I will make sure use comments more polite .

  9. #9
    Registered User
    Join Date
    02-21-2024
    Location
    africa
    MS-Off Ver
    2010
    Posts
    48

    Re: Merge partial character before specific word across sheets based on headers

    NOTE: some dates in "SALES" are mis-typed!
    not really understand it !
    the formula doesn't achieve my project I think vba is fit , because I said
    I will add new sheets every time before RESULT sheet
    then will should populates sheets names automatically, also when add new items in column(DETAILES) in this case will increment column by add new header and match sheet name for the new header also will change insert TOTAL row in the location. after this clarification I'm not sure why you think the formula is suitable!!

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,293

    Re: Merge partial character before specific word across sheets based on headers

    See attached: and yes, you need VBA!
    Attached Images Attached Images
    Last edited by JohnTopley; 08-07-2024 at 04:25 AM.

  11. #11
    Registered User
    Join Date
    02-21-2024
    Location
    africa
    MS-Off Ver
    2010
    Posts
    48

    Re: Merge partial character before specific word across sheets based on headers

    Ahh, sorry about it !
    I edited file .
    I hope to getting solution by vba .
    thanks

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,293

    Re: Merge partial character before specific word across sheets based on headers

    Is there any reason why ALL your input sheets do not start in column A instead of a "random" set of selction A,B or C?
    Last edited by JohnTopley; 08-07-2024 at 07:31 AM.

  13. #13
    Registered User
    Join Date
    02-21-2024
    Location
    africa
    MS-Off Ver
    2010
    Posts
    48

    Re: Merge partial character before specific word across sheets based on headers

    well , if you see should start from column A I don't mind, but the only problem is DETAILES column sometimes is different in location in some sheets, that's why I ask for matching headers.

  14. #14
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,293

    Re: Merge partial character before specific word across sheets based on headers

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

  15. #15
    Registered User
    Join Date
    02-21-2024
    Location
    africa
    MS-Off Ver
    2010
    Posts
    48

    Re: Merge partial character before specific word across sheets based on headers

    awesome!
    may you add hyphen as zero for empty cells ?
    I try to do like this
    Please Login or Register  to view this content.
    but doesn't work !

  16. #16
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,293

    Re: Merge partial character before specific word across sheets based on headers

    Please Login or Register  to view this content.
    Missing full stop at beginning

  17. #17
    Registered User
    Join Date
    02-21-2024
    Location
    africa
    MS-Off Ver
    2010
    Posts
    48

    Re: Merge partial character before specific word across sheets based on headers

    thanks but doesn't show anything in empty cells
    Attached Files Attached Files

  18. #18
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,293

    Re: Merge partial character before specific word across sheets based on headers

    Need to set blank cells in array to zero

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JohnTopley; 08-07-2024 at 02:39 PM.

  19. #19
    Registered User
    Join Date
    02-21-2024
    Location
    africa
    MS-Off Ver
    2010
    Posts
    48

    Re: Merge partial character before specific word across sheets based on headers

    well, but why doesn't show for row 8 ?

  20. #20
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,293

    Re: Merge partial character before specific word across sheets based on headers

    Sorry - updated file
    Attached Files Attached Files

  21. #21
    Registered User
    Join Date
    02-21-2024
    Location
    africa
    MS-Off Ver
    2010
    Posts
    48

    Re: Merge partial character before specific word across sheets based on headers

    great !
    thank you so much for every thing .

+ 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] Populate amounts for separated range based on matching headers across sheets for partial
    By abdo M in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-02-2023, 01:20 PM
  2. [SOLVED] Change partial text color, up to specific character (loop)
    By xtinct2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-25-2022, 03:03 AM
  3. [SOLVED] copy data from specific sheets based on headers and insert column
    By Mussa-A in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-26-2021, 11:57 PM
  4. MERGE and SORT several sheets with identical headers.
    By 4ero in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-21-2020, 12:01 PM
  5. Replies: 0
    Last Post: 08-17-2017, 11:26 AM
  6. [SOLVED] vba code to merge headers from 2 sheets at their specific columns position 3rd sheet
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-02-2017, 11:41 PM
  7. Replies: 0
    Last Post: 04-21-2006, 03:40 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