ClimoC
Well-known Member
- Joined
- Aug 21, 2009
- Messages
- 584
'Ello...
Situation:
2 sheets with tables of info, variable text lengths in each cell. Each 'line' in each cell is separated with carriage returns (crlf's/chr(10)'s).
My script compares the first 4 characters after each crLf with the corresponding characters in the other sheet. If they are different, it highlights just those four characters. Ditto for the other part of the separated-string.
ie, you get results that look like this:
Cell1: "1000} Go to Doctor"
Cell2: "1100} Go to Doctor"
-Would make just "1100" red because it has changed.
Example2:
Cell1: "1000} Go to Doctor"
Cells2: "1000} Go to Dentist"
-Would make "Go to Dentist" red because it has changed.
This all works really well, but then what I'm trying to do, in the quickest code possible, is transfer this information to other workbooks/tables.
Doing a GUI Copy-Paste works, but my code for transferring the data does match/lookups in vba, and then uses the ".value = Cells(xrow,ycol).value", so the text colours get lost.
Anyone know a way of doing this? I really don't want to find the destination cell and then put my sheets through the labour of 5000 "Copy, PastexlAll, CutCopymode=False" 's because the procedure already takes 15 seconds as it is!
Situation:
2 sheets with tables of info, variable text lengths in each cell. Each 'line' in each cell is separated with carriage returns (crlf's/chr(10)'s).
My script compares the first 4 characters after each crLf with the corresponding characters in the other sheet. If they are different, it highlights just those four characters. Ditto for the other part of the separated-string.
ie, you get results that look like this:
Cell1: "1000} Go to Doctor"
Cell2: "1100} Go to Doctor"
-Would make just "1100" red because it has changed.
Example2:
Cell1: "1000} Go to Doctor"
Cells2: "1000} Go to Dentist"
-Would make "Go to Dentist" red because it has changed.
This all works really well, but then what I'm trying to do, in the quickest code possible, is transfer this information to other workbooks/tables.
Doing a GUI Copy-Paste works, but my code for transferring the data does match/lookups in vba, and then uses the ".value = Cells(xrow,ycol).value", so the text colours get lost.
Anyone know a way of doing this? I really don't want to find the destination cell and then put my sheets through the labour of 5000 "Copy, PastexlAll, CutCopymode=False" 's because the procedure already takes 15 seconds as it is!