VBA Update new cell with values and format

ManUBlueJay

Board Regular
Joined
Aug 30, 2012
Messages
156
I am trying to update a range of cells in my database which is an excel sheet with another input range.
The range in the database is named "MyRange". The Input Range is named "Input"

When I use this code:
Range("MyRange") = Range("Input") nothing happens

When I use:
Range("MyRange") = Range("Input").values, it updates but does not bring across my formats which includes one bold cell and 3 regular.
How can I update MyRange with the values and the formats.
 

footoo

Well-known Member
Joined
Sep 21, 2016
Messages
2,740
Copy/PasteSpecial/Format.
The code can be obtained from the macro recorder.
 

ManUBlueJay

Board Regular
Joined
Aug 30, 2012
Messages
156
That requires sheet switching and feels clumsy.
What I have is instantaneous just missing the formats.
 

footoo

Well-known Member
Joined
Sep 21, 2016
Messages
2,740
First get the code from the macro recorder and tweak it to avoid sheet switching.
If you don't know how to tweak it, post the code and someone will do it for you.
 

Forum statistics

Threads
1,085,651
Messages
5,384,936
Members
401,927
Latest member
commae

Some videos you may like

This Week's Hot Topics

Top