Keep formatting when referencing a string

RogerGiudici

New Member
Joined
Sep 2, 2011
Messages
2
I'd like to have the formatting of a text string moved along with its reference. I'd like to write a UDF that either sets the Characters property of the destination cell to match that of the original, or use the UDF in the conditional formatting for the cell. Third choice would be to write a function that sets the contents of a defined cell to the value and formatting of the source cell (i.e., do a copy and paste form the source cell to the destination cell)
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Your question is rather vague. UDFs being formulas cannot themselves return formatted rssults. If you want to use a UDF with Conditional Formatting (or even if you don't), Conditional Formatting cannot format individual characters. What I don't understand is, if you want the same formatting in the original cell as in its destination cell, why not just copy and paste. Your situation should be explained a little more thoroughly, with an example of exactly what is in one cell, what it looks like format-wise, what you want to do and what your expected results are.
 
Upvote 0
I have a worksheet that contains a table of information (let's call this sheet ItemDescription) about a set of objects. I need to produce a set of detail sheets on a user selected set of rows. When an attribute for a row is updated, the corresponding element on the detail sheet needs to be updated. The text in cell updated by the user contains formatting, such as text in blue to indicate changes. Right now I have a formula that looks like =index(ItemList, LineNumber,ColumnNumber) where ItemList is a named range fo rteh list, LIneNumber is teh calculated line number of eth item slected by teh user, and ColumnNumber is the number of the column that contains teh desired attribute. This brings forward the value of the cell but not its formatting. I'd like to create a UDF such as CopyFormattedText() that brings formward both the value and the formatting. A copy paste requires manual work by the user to move the data. My workbook only requires that they fill in a field in the list the specifies the record is to be insluded in teh summary report and that a detail report is to be created.
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,253
Members
452,900
Latest member
LisaGo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top