![]() |
Find and replace of word causes change of font formatting
Hi,
I am having a problem with find and replace. In a cell with mixed format - italics and regular text - when I do a find and replace of a "word" in the text - it automatically changes all the formatting to italics. I have quadrupled checked the "formatiing options" . That's not the reason. It seems like a "default" to the system for it to go to "italics" if that is one of the formats in the cell. I have looked this up in all available avenues "Help", Micorsoft excel online, Microsoft Office, Goodgle. You name it. I can't find anything on this subject. I did see another guy on one of these forums had a similar problem, only excel was changing his color fonts when he did a find a replace in a cell. Please, somebody help me. Thanks. jwa90010 |
jwa90010,
When Excel finds and replaces text, it applies the formatting of the first text character of the existing string to the entire new string. That is just the way that Excel behaves. You would need to write a macro that records the formatting of each character prior to the replace and reformats the cell after based on that record. Not a simple macro, but do-able. HTH, Bernie MS Excel MVP "jwa90010" wrote in message ... Hi, I am having a problem with find and replace. In a cell with mixed format - italics and regular text - when I do a find and replace of a "word" in the text - it automatically changes all the formatting to italics. I have quadrupled checked the "formatiing options" . That's not the reason. It seems like a "default" to the system for it to go to "italics" if that is one of the formats in the cell. I have looked this up in all available avenues "Help", Micorsoft excel online, Microsoft Office, Goodgle. You name it. I can't find anything on this subject. I did see another guy on one of these forums had a similar problem, only excel was changing his color fonts when he did a find a replace in a cell. Please, somebody help me. Thanks. jwa90010 |
Thanks for your response. I must admit I am stunned. Why would MS write its
program that way? I would think the default would be to keep the formatting as is unless otherwise requested. As to writing a macro. That's out of my league. I am a self-employed business woman . My business isn't computers. How do I get a macro like your are suggesting written and installed in my excel program? Thanks, Joy "Bernie Deitrick" wrote: jwa90010, When Excel finds and replaces text, it applies the formatting of the first text character of the existing string to the entire new string. That is just the way that Excel behaves. You would need to write a macro that records the formatting of each character prior to the replace and reformats the cell after based on that record. Not a simple macro, but do-able. HTH, Bernie MS Excel MVP "jwa90010" wrote in message ... Hi, I am having a problem with find and replace. In a cell with mixed format - italics and regular text - when I do a find and replace of a "word" in the text - it automatically changes all the formatting to italics. I have quadrupled checked the "formatiing options" . That's not the reason. It seems like a "default" to the system for it to go to "italics" if that is one of the formats in the cell. I have looked this up in all available avenues "Help", Micorsoft excel online, Microsoft Office, Goodgle. You name it. I can't find anything on this subject. I did see another guy on one of these forums had a similar problem, only excel was changing his color fonts when he did a find a replace in a cell. Please, somebody help me. Thanks. jwa90010 |
Seems macros are the only way to go. Will learn macros now. Thanks. Joy
"Bernie Deitrick" wrote: jwa90010, When Excel finds and replaces text, it applies the formatting of the first text character of the existing string to the entire new string. That is just the way that Excel behaves. You would need to write a macro that records the formatting of each character prior to the replace and reformats the cell after based on that record. Not a simple macro, but do-able. HTH, Bernie MS Excel MVP "jwa90010" wrote in message ... Hi, I am having a problem with find and replace. In a cell with mixed format - italics and regular text - when I do a find and replace of a "word" in the text - it automatically changes all the formatting to italics. I have quadrupled checked the "formatiing options" . That's not the reason. It seems like a "default" to the system for it to go to "italics" if that is one of the formats in the cell. I have looked this up in all available avenues "Help", Micorsoft excel online, Microsoft Office, Goodgle. You name it. I can't find anything on this subject. I did see another guy on one of these forums had a similar problem, only excel was changing his color fonts when he did a find a replace in a cell. Please, somebody help me. Thanks. jwa90010 |
jwa90010 wrote: Seems macros are the only way to go. Will learn macros now. Thanks. Joy all snipped..... If you want the ultimate help with macros look here for a start: www.vbaexpress.com or www.officearticles.com/forums Ralphael, the OLD one |
All times are GMT +1. The time now is 01:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com