• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Excel VBA Compare 2 sheet and highlight duplicate values with 2 criteria

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
I am new for doing Excel VBA coding. And I would like to write a simple coding which is highlight the duplicate number

If my ShpMarkLog(test) worksheet SMOrder_No = TALLY-SHEET Order No.
Then If my ShpMarkLog(test) worksheet SMNewCTNno = TALLY-SHEET (Column H8 TO AK103) Then Hightlight the duplicate number.
Then If the TALLY-SHEET (Column H8 TO AK103) is blank, then put white color with blank.

But when the system didn't follow my criteria, which is only highlight the number if the SMOrder_No = Order No. Below is my coding.


Sample Picture.
https://ibb.co/FYH6FCV
https://ibb.co/DMnb8RY

Sample Excel Link.
https://docs.google.com/spreadsheets/d/1hiEIEwQIobUNMj-b3E8Gr-aIeFB14DcN/edit?usp=share_link&ouid=113728469994646825003&rtpof=true&sd=true

I Want to make the number only highlight duplicate when the criteria is meet. May I know how should I modify the code in order to get my result. Really really thank you.

 
The human mind is a dangerous plaything. This tiny ad is pretty safe:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic