+ Reply to Thread
Results 1 to 47 of 47

[VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

  1. #1
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Good Day All,

    I need some assistance with revising some code from one of the amazing members of this community, please see the code via the Excel file attached. Apologies, i was unable to paste the code in the body of the request as it gave me an error when posting noting i could not post links/images/etc.. despite me not posting any links/images, perhaps a moderator can post the code for me.

    The code works perfectly right now for highlighting the differences between the old and new workbooks while outputting the data from the latest sheet. It notes all deleted and added rows; however, I need to slightly revise some of the output information as well as the way they are output.

    I need to update the code in the following ways:
    1. Highlighted differences between the two sheets needs to be highlighted in a different color (See rows 3-15 of Sheet 3). Currently the color of all highlighted cells are a bright yellow (looks like the code highlights all in VBYELLOW), can that color be changed to the yellow shown in rows 3-15?
    2. Deleted Rows should be outputed as shown in Row 36 of Sheet3 (ITEM#22.1 has been deleted on the latest sheet...I would like the output to show the deleted ITEM# in COLUMN A and note "DELETED" in COLUMN B with the ENTIRE ROW HIGHLIGHTED). Currently the code shows the old output in YELLOW, I would like to make it clear that this ITEM# was deleted and highlight in the lighter yellow.
    3. All differences in COLUMNS B,C,D,E should have the OLD OUTPUT CROSSED OUT followed by a SPACE and then the NEW OUTPUT (Please reference rows 31,35,37,38). Currently the code just outputs the NEW DATA, I would like to have the outputs of the old data crossed out with the new data noted after a space so that we can clearly show there has been a change and what the change was.

    Thank you all very much for your time and assistance in the matter. Have yourselves a wonderful day!
    Attached Files Attached Files
    Last edited by NotSoTechSavvy; 06-27-2021 at 05:44 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,290

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    If you can't post the code, then we won't be able to, either. There will be something in it that the forum is reading as HTML code, and that's why it's being blocked(it's a security measure).

    2019 is the latest standalone version of Excel, so I think you probably have MS365 - please update your forum profile accordingly.
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Replace "test" sub with the following code, keeping "mySort" sub intact.
    Please Login or Register  to view this content.
    Last edited by jindon; 06-27-2021 at 08:12 AM.

  4. #4
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    jindon!!! I'm so glad I found you again, I hope you are well! Your code was amazing and really helped me out the past couple weeks.

    I'm sorry, but I don't really understand what you mean by "Replace "test" sub with the following code, keeping "mySort" sub intact."
    I pasted and ran your code and it gave me a Compile error: Sub or Function not defined and it highlighted the mySort.

    Sorry I'm not very literate in VBA, you're going to have to really dumb down your responses to me. Have a great day everyone!

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    You have "test" sub procedure and "mysort" sub procedure in Module10.

    Just replace "test" sub procedure with the code I posted.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Yeah, I was able to make it work ONCE, but I still have no idea how I got the code to work, nor can I use it on any other files.

    I'm not understanding what's going on, apologies.

  7. #7
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Good Morning/Afternoon/Evening jindon.

    If perhaps you could start from a completely unedited file maybe I would understand better. Please find below an Excel sheet that has the two sheets renamed accordingly with no macro attached.

    Can you please teach me how to apply this code to a file like this one.

    Thanks,
    Attached Files Attached Files

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Shutdown pc already so I will look at it tomorrow.

  9. #9
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    No problem, have yourself a wonderful night.

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Code is working just fine... not only the first time.

    If you are changing sheet names for "2-19-2021" & "5-27-2021", sheet names must be changed accordingly.
    This code gets OLD data from most left worksheet and New data from 2nd worksheet, so you don't need to change the sheet names.
    New worksheet will be created in 3rd worksheet.
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Good Morning jindon,

    Apologies, I've been going back and forth between my remote work computer and my main PC which does not have Excel, so I must have not been copying it correctly in its entirety. Your code as always is perfect my friend, thank you very much for your time and assistance. I wish you health and good fortune, be well brother.

    Forever Grateful,
    NotSoTechSavvy

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    You are welcome and same to you.

  13. #13
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Good Day jindon,

    I hope this message finds you well. I don't know if this will be read as this is a solved post; however, I thought perhaps this would be best posted here. I've been testing the code multiple times and it's run nearly flawlessly. I have two comments that perhaps you can assist with.

    1. It seems that when a cell is a a NUMBER, it's storing the number as TEXT and is showing up as a change regardless of whether or not there is a revision and the cell is JUSTIFIED RIGHT. Please reference the Excel File attached, in Row 112 (Item #87) the Rice Cooker Model is the same; however, the code is highlighting the cell in Column E and the cell is justified right. Can you please revise the code so that this doesn't happen for cells that are numbers. Currently most of the items are justified left except a few cells on the output sheet are justified right due to the data being saved as text, can you revise the code to ensure the entire document JUSTIFIED LEFT EXCEPT row 1.
    2. In the cells where there are highlighted revisions, the cell borders are gone so they no longer have grid lines. Can the grid lines/cell boarders be added back to all cells uniformly.

    **Please note, this Example attached was the original posts' code so the colors/formatting are not accurate to your latest code; however, the issue persists in your latest code**

    Thanks,
    Attached Files Attached Files
    Last edited by NotSoTechSavvy; 07-06-2021 at 05:12 PM.

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    I don't understand why you are not using the code I last posted in #10.
    1)
    change one line
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    2) Border? where? if you are talking about grid lines, they are always there, but it is not recognizable when cell is colored.

  15. #15
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Good Day jindon,

    I am indeed using your code from post #10. I just took an example excel file from the previous post to use as an example.

    I updated your code and ran it on a different project with the same issue. It is still showing Line#49,111,112,120 Column E as a highlighted items. Any time there is a cell with only numbers, this issue arises.

    As for the highlighting not showing the grid lines, is there a way to have the grid lines show over a colored cell, perhaps a border around all cells?

    Thanks,
    Attached Files Attached Files
    Last edited by NotSoTechSavvy; 07-06-2021 at 10:07 PM.

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    OK, 2 more changes in "test" sub in bold.
    Please Login or Register  to view this content.

  17. #17
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    I get a Compile Error:
    Sub or Function not defined

    Then it highlights the mySort

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    You should not delete mySort sub procedure...

  19. #19
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Apologies, I don't understand what you mean. I did not delete anything, I just copied and pasted the code into the Module and ran it. It came back with the Compile Error.

    Can you test it on the following Workbook to see if there is an issue?

    Thanks,
    Attached Files Attached Files

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    It is consists of 2 sub procedures.

    test subprocedure and my sort subprocedure and both MUST be kept.
    Please Login or Register  to view this content.

  21. #21
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    That worked perfectly for solving the first issue, you are absolutely amazing. Can you also have ALL BORDERS for all cells that way they show up in the PDF printout around the highlighted cells as well?

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Upload a workbook with EXACT format to avoid misunderstandings.

  23. #23
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Please see attached Sheet3 which has borders around all cells.

    Thanks,
    Attached Files Attached Files

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

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

  25. #25
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Thank you again!! This worked perfectly for my equipment schedules, exactly as needed.

    I have another issue that perhaps you'd be so kind to assist in. We also run electrical/plumbing schedules and I've tried to apply your code to this with limited success.
    The first issue is similar to the previous project as numbers are being saved as text and they're justified differently. The second issue is much more difficult, as it requires sorting with some sort of data recognition.

    Issue #1: Numbers Saved as Text & Justified Text:
    Please see Sheet1 for CURRENT output
    Currently, the schedule has the same issue where numbers are being highlighted despite no change due to the numbers being saved as text.
    See Sheet1 Cells F7, F11, F16, F20.
    Also, the cells are justified right for some of the information where it should be justified right for all except ROW 1
    Please see Sheet2 for CORRECT format.


    Issue #2: Row Sorting and Row Addition/Deletion
    Please see Sheet1 for CURRENT output
    Item #B5 has two connections in the first sheet (2021-06-18) and then three electrical connections in the second sheet (2021-07-06).
    When the excel sheet is created, any line item that has multiple connections are shown in the row below with a "-" underneath in Column A with the information in Columns F-O.
    Because we previously used Column A to sort, the extra utility information goes to the top.
    Is there a way for us to sort so that utilities for B5 and B6 show up under the correct rows (See Rows 26-28 on the Sheet2).
    Also, it needs to pick up the additional utility row (Row 28 was an added line from the 2021-06-08 sheet) and highlight them or the deletion of a row of utilities.
    Please see Sheet2 for CORRECT format.
    Attached Files Attached Files

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    One thing very clear is that it is impossible to compare multiple same value against multiple same value.

    You have multiple "-" in col.A.

  27. #27
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    I assumed the would be the case.
    Thank you so much again for all your help! Have a wonderful day!

  28. #28
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Good Morning/Afternoon/Evening jindon,

    I have been thinking over the problem with the electrical/plumbing schedules and perhaps you can advise if my solution will work. Please see attached Excel file.
    So originally we have the first two sheets (2021-06-18 and 2021-07-06) which are the input files.
    Currently when we run the macro it outputs Sheet 1, which has the issues noted above.

    Is there a way to create a macro that will EDIT Column A of the input files to have unique values (See Sheet2 and Sheet3). 2021-06-18 will look like Sheet2 / 2021-07-06 will look like Sheet3 and the OUTPUT would be Sheet4
    If we ADD ascending letters A-Z after the Item# where there are missing values in Column A (Cells A26-A28 of Sheet3 for example) in the first two input sheets, would we then be able to run your macro on the file since we have unique values?

    Thanks,
    Attached Files Attached Files
    Last edited by NotSoTechSavvy; 07-07-2021 at 03:30 PM.

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Yep, that make sense.

    I will be very busy today, so next my response will be late this afternoon.

  30. #30
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    No problem, I'm just glad that I stumbled upon a possible work-around. Have a great day!

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    This one will create copy of 1st and 2nd worksheet to 3rd & 4th, so will not touch original sheets and newly added 5th worksheet will give you report.
    And convert text number to real number in both copied worksheets.
    Please Login or Register  to view this content.

  32. #32
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Good Morning/Afternoon/Evening jindon,

    Thank you very much for the revised code, it seems to have worked with some slight issues still, please see attached Excel file.

    This is the rough template of the information I'm trying to process all at once. The issues I have noticed are the following:
    1. The ROWS 231-253 are being placed at the bottom instead of after their respective Item#s.
    2. Instead of a "." after the Item#, can we perhaps use a SPACE (Example: 1, 1.1, 1.2, 1.2 A, 2, 3, 3 A, etc...)
    3. All rows EXCEPT Row 1 are not all Justified LEFT, the information is a little difficult to read at times

    Thanks,
    Attached Files Attached Files

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Replace ONLY "test" sub with the follwing code while keeping "mySort" sub intact.
    Please Login or Register  to view this content.
    Last edited by jindon; 07-08-2021 at 07:40 AM.

  34. #34
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Good Evening jindon,

    One slight oversight on my part, it seems excel formatting uses the SPACE A in certain instances to denote time. Please see Cells A14 & A17 of Sheet Date 2(2) for this issue. If you look on Sheet3, Rows 3 & 4 are in the incorrect row and with the incorrect Item# because of this.

    Thanks,
    Attached Files Attached Files

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Yeah, that was a side effect of changing 3.A to 3 A, Excel read it as a time.

    I have edited one line in the last code in bold.

  36. #36
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Yep, that worked amazingly as always. Thank you so very much for taking the time to help me out with this project, I will stress test the macro to see if there are any things that I personally missed that might need some reworking.

    Have yourself a wonderful night and once again thank you so much.

  37. #37
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Good Evening jindon,

    Apologies, I just found one slight thing that needs fixing. It seems that when a row has DELETED in column B, it does not cross out the information for the Columns G-AB. Please see Sheet3 Rows 18, 23 & 24, in Columns G-AB those should have a strikethrough.
    Please see Sheet4 Rows 18, 23 & 24 for the correct outputs.

    Thanks,
    Attached Files Attached Files

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

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

  39. #39
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Thank you again, have a good night!

  40. #40
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Good Morning/Afternoon/Evening jindon,

    I have some comments that I need your assistance with to revise to macro.

    Previously, we had dashes "-" in empty cells, but I've now removed them in my original input files. When I run the code now, the output has the following issues.
    a. The revised are going to the top as they don't have an Item# in front because they're no longer adding A-Z to the Item# in column A
    b. The text is spilling into the adjacent empty cells which is cluttering the chart

    Is there a way to have the cells that previously were empty with a placeholder "-" be completely empty without the data overlowing and having the previous formatting?

    Once I solve this, there are some other slight issues but I cannot put out an example file until this issue is resolved.

    Thanks,
    Attached Files Attached Files

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    I feel like you don't have your own vision of what you want to have as a Final result, so think about if carefully and when you find it for yourself, upload a workbook as a FINAL format.

  42. #42
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Good Morning/Afternoon/Evening jindon,

    I have done a bunch of testing/review of the template to finalize this project. Please find attached the template how I'd like it to look.
    Sheet 4 has the correct data input, I only made changes to Rows 1-103 to use as examples.

    Note the following changes:
    1. For all data in Columns D-X:
    a. If there is no data in the cell of the Date1 sheet, do not show the old data, just show the new data in Sheet3 (See Sheet4 Rows 13-24) We are removing the extra "-" within each cell if uncessary
    b. If there is no data in the cell of the Date2 sheet, do not show the new data, just show the old data crossed out in Sheet3 (See Sheet4 Rows 13-24) We are removing the extra "-" within each cell if unecessary
    c. If there is data in the cells for Date1 & Date2, show the old data crossed out and the new data after a space (See Sheet4 cells F13, E33, F35)

    2. Currently Column X is not printing old/new data correctly. See Sheet4 Rows 39, 68, 92, 102)
    It is only printing the current data from Date2, please have it show the information according to the parameters above.

    3. I would like to LOCK Column A and Rows 1&2 (See Sheet4)


    Again, thank you very much for your time and for sticking with me through this project.

    Have a great day!
    Attached Files Attached Files

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Replace "test" sub procedure with the following and see if it works as you expected.
    mySort sub procedure must be kept intact.
    Please Login or Register  to view this content.

  44. #44
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Good Afternoon jindon,

    Thank you very much for your assistance again.
    I've uploaded the resulting file, it seems as though the results for statement 1a are incorrect, it is crossing out the data from Date2 instead of just highlighting them.
    Please see Sheet3, for example cells G16,J16, K16, L16, G17, J17, K17, L17 should not be crossed out.
    1a. If there is no data in the cell of the Date1 sheet, do not show the old data, just show the new data in Sheet3 highlighted.

    Also, the ROWS 1&2 are locked, but COLUMN A is not locked. Can you have both Rows 1&2 AND Column A locked. That way when I pan right I can still see the Item#'s.

    Thank you very much =]
    Attached Files Attached Files

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

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    OK,
    try change
    1)
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    2)
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  46. #46
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Good Afternoon jindon,

    Thank you very much!!! It's perfect!
    I will be testing it out the next couple of weeks to see if there is anything wrong, but after my preliminary check of the results it is functioning perfectly. If there is anything I catch, I will make sure to compile all the information/errors to minimize any extra revisions if necessary, but I don't believe there will be any need.
    Once again you have outdone yourself and I thank you so much for your time and patience. Have yourself a wonderful day.

    Thanks,

  47. #47
    Registered User
    Join Date
    06-04-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    49

    Re: [VBA] Highlight Differences Between Two Worksheets with Old Worksheet Data Crossed Out

    Good Morning/Afternoon/Evening jindon,

    Okay so I've tested both excel files extensively and they work perfectly, again thank you very much for your work!!!!
    I have one final request if you would. I need to consolidate these two excel workbooks into one, the final product should look like the Final Template file.

    The MEP Excel Template will be the starting point upon which the rest of the macro will be added.
    First, I need to add another sheet (Sheet4) which will contain all the information in the following Columns (A,B,C,D,E,F) noting and highlighting all the changes in those columns as well.
    However, at the top of Sheet4 it should say "EQUIPMENT SCHEDULE" as shown in the Final Template (It should not say MEP SCHEDULE on the top of Sheet4 (this may require manually changing the name).
    Then I need the page layout ONLY for Sheet4 to be changed according to the HeaderandFooter macro that I created (apologies it's not very elegant as it was done using the Record Macro tool)


    Thank you very much for all your assistance, have a wonderful day!
    Attached Files Attached Files

+ 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] Compare data from two worksheets and highlight differences in active sheet
    By harman83 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-12-2015, 10:38 PM
  2. [SOLVED] Compare two worksheets and highlight differences on one of the worksheets
    By Phil Payne in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-18-2013, 04:00 AM
  3. how to merge 2 worksheets and highlight differences
    By daturo in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  4. how to merge 2 worksheets and highlight differences
    By daturo in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  5. [SOLVED] how to merge 2 worksheets and highlight differences
    By daturo in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 AM
  6. [SOLVED] how to merge 2 worksheets and highlight differences
    By daturo in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM

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