+ Reply to Thread
Results 1 to 15 of 15

How to compare 2 sheets data on a single sheet through VBA Codes?

  1. #1
    Forum Contributor PRADEEPB270's Avatar
    Join Date
    02-19-2010
    Location
    INDIA
    MS-Off Ver
    MSoffice-2016
    Posts
    332

    How to compare 2 sheets data on a single sheet through VBA Codes?

    I have 2 sheets in a file.One sheet is Current and other sheet is previous.Most of the part Code are same in both the sheets.But Qty,Rate and amount may be differ of a part code.Because,we are comparing to Current sheet from previous month.
    Now,I want a summary sheet which shows the result as below:-

    1-Place automatic all the part codes,part name and unit,having in both sheets in a single sheet i.e.summary or not repeat. ( Column B to D )
    2-Sum up automatic total Qty and amount as per Sheet of a part code ( Column E and G for Current and Column H and J for Previous ).Rate is divide to amount by Qty.
    3-Desired Result ( Column L to N ).Preferably descending order of the amount ( Column N ).

    Can it be possible from VBA Codes or MACRO Working?

    Please refer the attach file for more clarification.
    Attached Files Attached Files
    Regards


    Pradeep Kumar Gupta
    Gurgaon ( INDIA )

  2. #2
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2019
    Posts
    209

    Re: How to compare 2 sheets data on a single sheet through VBA Codes?

    Hi,

    i do not think you need Macro to do this. I have created a Vlookup function to it.

    Thanks
    Lex
    Attached Files Attached Files

  3. #3
    Forum Contributor PRADEEPB270's Avatar
    Join Date
    02-19-2010
    Location
    INDIA
    MS-Off Ver
    MSoffice-2016
    Posts
    332

    Re: How to compare 2 sheets data on a single sheet through VBA Codes?

    This will help in limit way.The reason is:-

    1-How will come Unique part codes from current and Previous sheets on summary sheet automatically?
    2-Grand total is not match with current and previous sheet.Refer your attach file and cell no.G2 and J2 on summary sheet.

  4. #4
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2019
    Posts
    209

    Re: How to compare 2 sheets data on a single sheet through VBA Codes?

    Hey Gupta,

    Do u have any macro to start with? I am unable to write the macro due to time constraint.
    If you have some macro to start with, and we can work it from there.

    Cheers
    lex

  5. #5
    Forum Contributor PRADEEPB270's Avatar
    Join Date
    02-19-2010
    Location
    INDIA
    MS-Off Ver
    MSoffice-2016
    Posts
    332

    Re: How to compare 2 sheets data on a single sheet through VBA Codes?

    At present,I have no any macro related to this query. In current scenario,I am doing in excel work to find the summary result.That is more time consuming and sometimes not accurate result.I am trying to find the VBA codes sotaht give accurate working and less time consume.

    Thanks and Regards.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to compare 2 sheets data on a single sheet through VBA Codes?

    He had one, but he has not shown this thread was posted over week ago and was closed as "Solved"

  7. #7
    Forum Contributor PRADEEPB270's Avatar
    Join Date
    02-19-2010
    Location
    INDIA
    MS-Off Ver
    MSoffice-2016
    Posts
    332

    Re: How to compare 2 sheets data on a single sheet through VBA Codes?

    By mistake,earlier sent was marked as Solved.But,some working was missing,found later.Try to sent again for fresh.

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to compare 2 sheets data on a single sheet through VBA Codes?

    Why did you said then?

    "At present,I have no any macro related to this query"

    You could have attached the code and should ask either for correction or a new code, but it appears you are shopping around-Good luck.

  9. #9
    Forum Contributor PRADEEPB270's Avatar
    Join Date
    02-19-2010
    Location
    INDIA
    MS-Off Ver
    MSoffice-2016
    Posts
    332

    Re: How to compare 2 sheets data on a single sheet through VBA Codes?

    Can anyone provide me the VBA codes of my query?

    Thanks in advance for awesome efforts.

  10. #10
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: How to compare 2 sheets data on a single sheet through VBA Codes?

    Pradeep,

    I started writing a solution for you and finished testing, but that was before I saw the posts from AB33. If you had some original code you have have posted a copy as opposed to me writing he whole thing from scratch.

    For this time I am willing to accept that it was not intentional.

    Please check the attached workbook. Worksheet summary_original was your version and worksheet summary was generated by the code
    Attached Files Attached Files
    If you like my contribution click the star icon!

  11. #11
    Forum Contributor PRADEEPB270's Avatar
    Join Date
    02-19-2010
    Location
    INDIA
    MS-Off Ver
    MSoffice-2016
    Posts
    332

    Re: How to compare 2 sheets data on a single sheet through VBA Codes?

    Thank you for providing the awesome result.Excellent Solution.Glad to find it.

    Thanks and Regards
    Last edited by PRADEEPB270; 10-10-2013 at 03:51 AM.

  12. #12
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: How to compare 2 sheets data on a single sheet through VBA Codes?

    PRADEEPB270

    Many members here(inclunding me) have offer to you many solutions in many of your threads, BUT:

    Posting duplicates threads seems that you don't respect the efford amd the time of all these members.

    Beside of this is against the forum rules.

    I have warning you again to don't post duplicates threads. You continue to do this.

    Sorry for saying this but unfortunately this is my LAST warning.

    Stop to post duplicate threads or else adding infractions to your record you will be banned of the forum.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  13. #13
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to compare 2 sheets data on a single sheet through VBA Codes?

    Oli,
    Of course it is deliberately intentional. There is nothing wrong asking for a different code or requesting to amend an existing code, but it is probably out right lie to say I do not have one.

    "At present,I have no any macro related to this query"

  14. #14
    Forum Contributor PRADEEPB270's Avatar
    Join Date
    02-19-2010
    Location
    INDIA
    MS-Off Ver
    MSoffice-2016
    Posts
    332

    Re: How to compare 2 sheets data on a single sheet through VBA Codes?

    I confirm that it is deliberately intentional. There is nothing wrong asking for a different code or requesting to amend an existing code, but it is probably out right lie to say I do not have one.

    "I declare that at present,I have no any macro related to this query.

    If anybody hurt from my post or overrule the forum mandate, I am really very sorry for that mistake.Keep in mind in future posts.

  15. #15
    Forum Contributor PRADEEPB270's Avatar
    Join Date
    02-19-2010
    Location
    INDIA
    MS-Off Ver
    MSoffice-2016
    Posts
    332

    Re: How to compare 2 sheets data on a single sheet through VBA Codes?

    If anybody hurt from my post or overrule the forum mandate, I am really very sorry for that mistake. I will keep in mind in future posts.


    Regards

+ 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] How to Compare 2 sheets datas on a single sheet in very quickly
    By PRADEEPB270 in forum Excel General
    Replies: 6
    Last Post: 09-30-2013, 08:24 AM
  2. Run several sheet specific VBA Codes from a single Macro
    By hangmattan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2013, 06:42 AM
  3. VBA - Compare the data across different sheets and put into one sheet
    By kw42chan in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-31-2011, 02:18 AM
  4. Using to and from zip codes to locate a single sheet
    By scottmcglasson in forum Excel General
    Replies: 4
    Last Post: 10-09-2008, 10:09 AM
  5. Multiple sheets as data for a single sheet
    By Newbie1092 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-19-2005, 01:25 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