Solved

How do I replace a cell value but the formatting

Posted on 2014-03-18
7
76 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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
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 use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

760 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

20 Experts available now in Live!

Get 1:1 Help Now