How to avoid removing fill effects and vertical alignment when unlisting a table?

CRHAAG

New Member
Joined
Jul 3, 2014
Messages
46
I noticed a strange thing when using VBA with tables yesterday. My code is basically doing the following:

Copy a table from sheet A
pasting thta table to sheet B
using .unlist to convert the table to a range

The issue is that the top row of the table has vertical text alignment and a gradient fill. When I convert it to a range, the alignment goes back to horizontal and the fill gets removed. This doesn't happen if I use a solid fill color.

Is there any way to stop it from doing this, or do I need to write code to go bad and change things to how I want them?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi,

The idea might be completely off but about this step: "pasting the table to sheet B" -> Since you convert to a range, why not paste values and number formats? Then format/colour cells as you need.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,803
Members
449,048
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top