Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DOR
 
Posts: n/a
Default Concatentate Join Identifier

In the unlikely event that you are prepared to allow the cells
containing the concatenated values to be converted to actual values
rather than remain as formulas, the following VBA rountine will color
the values as you require, assuming you first select the range to be so
converted and colored:

Sub ColorCat()
Dim Color1 As Long
Dim Color2 As Long
Dim Lgt1 As Integer
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
For Each cell In Selection
Color1 = cell.Offset(0, -2).Font.Color
Color2 = cell.Offset(0, -1).Font.Color
Lgt1 = Len(cell.Offset(0, -2))
cell.Font.Color = Color2
cell.Characters(1, Lgt1).Font.Color = Color1
Next cell
End Sub

This first converts the contents of the selected cells to values and
then colors them according to the colors and lengths of the values in
the two adjacent columns. Note that it does no validation whatsoever
regarding the lengths of the values in any of the cells, or the shape
of the selected range, or whether the contents are in fact the
concatenation of the two columns to the left. Nevertheless, it might
be a base from which you can start.

Unfortunately, it appears that you cannot have two different colors for
the result of a formula; the Uppercase/Lowercase solution that was
proposed may be your best bet if you must retain the formulas.

HTH

Declan O'R

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Spaces and Join Text in Cell Diggsy Excel Worksheet Functions 3 October 5th 05 03:50 AM
join two spreadsheets Raya Excel Discussion (Misc queries) 1 July 14th 05 02:13 PM
join columns, keep both values FourPenny New Users to Excel 5 May 31st 05 01:36 AM
unique identifier for invoices jamboulianb Excel Worksheet Functions 1 March 16th 05 06:20 PM


All times are GMT +1. The time now is 01:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"