Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How do I replace a cell value but the formatting

Posted on 2014-03-18
7
Medium Priority
?
86 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
  • 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
Industry Leaders: 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

927 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