?
Solved

How do I replace a cell value but the formatting

Posted on 2014-03-18
7
Medium Priority
?
84 Views
Last Modified: 2014-03-26
I have ThisWorkbook(MySheet).Range("A4").Value = "David"

However, when the value replaces whatever was previously in "A4" I also lose the formatting.  Any suggestions ?
0
Comment
Question by:upobDaPlaya
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 39

Expert Comment

by:nutsch
ID: 39938553
This shouldn't happen, unless your cell has conditional formatting and your change of value doesn't meet the same condition as the previous value.

Or there's a worksheet_change macro at work, but it's less likely.
0
 

Author Comment

by:upobDaPlaya
ID: 39938689
How would I update a column in vba to reflect Aria 10..Note I am putting backcolor into the cell via VBA, but I am not doing any formatting..
0
 
LVL 39

Expert Comment

by:nutsch
ID: 39938708
What's aria 10?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:upobDaPlaya
ID: 39938883
sorry arial 10... font family and size
0
 
LVL 39

Accepted Solution

by:
nutsch earned 2000 total points
ID: 39938890
With columns("a").Font
.Name = "Arial"
.Size = 10
End with
0
 

Author Closing Comment

by:upobDaPlaya
ID: 39957992
Perfect !  thx
0
 
LVL 39

Expert Comment

by:nutsch
ID: 39957998
Glad to help

Thomas
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question