+ Reply to Thread
Results 1 to 10 of 10

Combine data of multiple sheets to one with a code - add one condition

  1. #1
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,148

    Combine data of multiple sheets to one with a code - add one condition

    Hello experts
    This code is shared by beyond excel earlier. I need to add one additional condition in this code to update this and need your expertise to do so. IF Column A = Export, Column D = Export then in column S = Export. IF Column A = Export, Column D = URP then in column S = B2C
    as shown in the Expected result sheet.
    Thank you in advance.
    Attached Files Attached Files
    Last edited by RAJESH SHAH; 05-15-2023 at 01:14 PM. Reason: #Solved
    "There is nothing called problem, it's just absence of an idea to find*solution."
    ?I have not failed. I?ve just found 10,000 ways that won?t work.?
    ?Thomas Edison

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

    Question Re: Combine data of multiple sheets to one with a code - add one condition


    Hello,

    which code ?

    According to your explanation why not just using a filter or an advanced filter ?

  3. #3
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,148

    Re: Combine data of multiple sheets to one with a code - add one condition

    All my sheets are inter connected and making changes in the middle will effect all the other sheets. I just want to add a code in the end to replace B2C with Export and the result will be corrected in the connected sheets. I tried to write the code but I am getting a compile error.
    Please Login or Register  to view this content.

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

    Arrow Re: Combine data of multiple sheets to one with a code - add one condition


    As the formula contains two IF( but at the end 3 ")))" so try to remove one …

  5. #5
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,148

    Re: Combine data of multiple sheets to one with a code - add one condition

    I removed and tested again but still compile error...Invalid or unqualified reference at this line .Columns

  6. #6
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,148

    Re: Combine data of multiple sheets to one with a code - add one condition

    I think I was able to edit one of the earlier codes and get this one right. Maybe it will work on the original data too. 爛爛
    Please Login or Register  to view this content.

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

    Arrow Re: Combine data of multiple sheets to one with a code - add one condition


    Just combining the Range once :
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,148

    Re: Combine data of multiple sheets to one with a code - add one condition

    Eeek. I missed something again. Again not the expected answer. Sorry Marc L. I will re check the problem and will be back soon.

  9. #9
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,148

    Re: Combine data of multiple sheets to one with a code - add one condition

    The IF condition has to include OR / AND in the formula. I forgot to add a few lines in the sample data where D = URP and A <> Export. I have added them in this file. So, sorry for the blunder.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,148

    Re: Combine data of multiple sheets to one with a code - add one condition

    The issue is resolved now. The problem was in the source sheet which is corrected now. Thank you Marc for your support.

+ 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 data of multiple sheets to one with a code
    By RAJESH SHAH in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 03-24-2023, 06:43 AM
  2. [SOLVED] Code to combine data of 2 sheets with condition
    By RAJESH SHAH in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-04-2023, 02:49 PM
  3. How to combine data of sheets in one workbook based to multiple IF condition
    By mami502003 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-20-2021, 10:01 AM
  4. [SOLVED] Need to combine a code that loops through multiple sheets
    By g1terra in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-31-2019, 02:07 PM
  5. Help make my code work: Loop through folder of workbooks with multiple sheets and combine
    By carlito2002wgn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2019, 08:19 PM
  6. How to combine code from multiple sheets to one sheet
    By Braden8898 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-12-2018, 10:42 AM
  7. Replies: 6
    Last Post: 04-18-2012, 02:49 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