Solved

How do I replace a cell value but the formatting

Posted on 2014-03-18
7
77 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

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

Accepted Solution

by:
nutsch earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

911 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now