Hi Rajan, Thanks for your reply, its working fine for the Query I mentioned, but there is a slight change my Query was not clear actually we can’t fix the length of the characters I have tried to give the examples this time, please do the needful at the earliest.
Example: To be Highlighted ABCD_EFGH_IJKL_201202.zip 201202 ABCD_EFGH_IJKL_201203.zip 201203 ABCD_EFGH_LKJI_201203.zip LKJI ABCD_EFGH_IJKL_201203.zip IJKL The difference may be in any part of the word, only the different character needs to be highlighted Regards, Pavan Kumar G On 4/26/12, Rajan_Verma <rajanverma1...@gmail.com> wrote: > > Hi Pavan > > Try this Code, See the attached File > > > Sub HighLight() > > Dim intI As Integer > > For intI = 1 To Range("rngMyRange").CurrentRegion.Rows.Count Step 2 > If Left(Cells(intI, 1), 3) <> Left(Cells(intI + 1, 1), 3) Then > Cells(intI, 1).Characters(1, 3).Font.ColorIndex = 5 > Cells(intI + 1, 1).Characters(1, 3).Font.ColorIndex = 5 > End If > If Right(Cells(intI, 1), 3) <> Right(Cells(intI + 1, 1), 3) Then > Cells(intI, 1).Characters(4, 3).Font.ColorIndex = 5 > Cells(intI + 1, 1).Characters(4, 3).Font.ColorIndex = 5 > End If > Next > > > > > End Sub > > -----Original Message----- > From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] > On Behalf Of pavan Kumar > Sent: Apr/Thu/2012 07:21 > To: excel-macros@googlegroups.com > Subject: Re: $$Excel-Macros$$ Highlight the Words > > HI, > > Yes, it's more than one and it's not on formula they are text and i will be > using this macro with the file structure macro which will provide me the > file names and folder names and i will be comparing this data with old data. > > Regards, > pavan Kumar G > > On 4/26/12, dguillett1 <dguille...@gmail.com> wrote: >> More info: >> more than one? >> show layout example >> are they text or formulas >> etc. >> >> >> >> Don Guillett >> Microsoft MVP Excel >> SalesAid Software >> dguille...@gmail.com >> -----Original Message----- >> From: pavan Kumar >> Sent: Thursday, April 26, 2012 4:34 AM >> To: excel-macros >> Subject: $$Excel-Macros$$ Highlight the Words >> >> Hi Team, >> >> I am looking for a macro to highlight the difference word >> >> Example: Comparing two cells >> >> ABCFeb ABCMar >> >> Then Only Feb and Mar should be highlighted. >> >> >> Regards, >> Pavan Kumar G >> >> -- >> FORUM RULES (986+ members already BANNED for violation) >> >> 1) Use concise, accurate thread titles. Poor thread titles, like >> Please Help, Urgent, Need Help, Formula Problem, Code Problem, and >> Need Advice will not get quick attention or may not be answered. >> >> 2) Don't post a question in the thread of another member. >> >> 3) Don't post questions regarding breaking or bypassing any security >> measure. >> >> 4) Acknowledge the responses you receive, good or bad. >> >> 5) Cross-promotion of, or links to, forums competitive to this forum >> in signatures are prohibited. >> >> NOTE : Don't ever post personal or confidential data in a workbook. >> Forum owners and members are not responsible for any loss. >> >> ---------------------------------------------------------------------- >> -------------------------------- To post to this group, send email to >> excel-macros@googlegroups.com >> >> -- >> FORUM RULES (986+ members already BANNED for violation) >> >> 1) Use concise, accurate thread titles. Poor thread titles, like >> Please Help, Urgent, Need Help, Formula Problem, Code Problem, and >> Need Advice will not get quick attention or may not be answered. >> >> 2) Don't post a question in the thread of another member. >> >> 3) Don't post questions regarding breaking or bypassing any security >> measure. >> >> 4) Acknowledge the responses you receive, good or bad. >> >> 5) Cross-promotion of, or links to, forums competitive to this forum >> in signatures are prohibited. >> >> NOTE : Don't ever post personal or confidential data in a workbook. >> Forum owners and members are not responsible for any loss. >> >> ---------------------------------------------------------------------- >> -------------------------------- To post to this group, send email to >> excel-macros@googlegroups.com >> > > -- > FORUM RULES (986+ members already BANNED for violation) > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will > not get quick attention or may not be answered. > > 2) Don't post a question in the thread of another member. > > 3) Don't post questions regarding breaking or bypassing any security > measure. > > 4) Acknowledge the responses you receive, good or bad. > > 5) Cross-promotion of, or links to, forums competitive to this forum in > signatures are prohibited. > > NOTE : Don't ever post personal or confidential data in a workbook. Forum > owners and members are not responsible for any loss. > > ---------------------------------------------------------------------------- > -------------------------- > To post to this group, send email to excel-macros@googlegroups.com > > -- > FORUM RULES (986+ members already BANNED for violation) > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will > not get quick attention or may not be answered. > > 2) Don't post a question in the thread of another member. > > 3) Don't post questions regarding breaking or bypassing any security > measure. > > 4) Acknowledge the responses you receive, good or bad. > > 5) Cross-promotion of, or links to, forums competitive to this forum in > signatures are prohibited. > > NOTE : Don't ever post personal or confidential data in a workbook. Forum > owners and members are not responsible for any loss. > > ------------------------------------------------------------------------------------------------------ > To post to this group, send email to excel-macros@googlegroups.com > -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com