Macro Alternate column width adjustment

stct80

Board Regular
Joined
Apr 26, 2010
Messages
59
Hello and Greetings!

I am relatively new to the VB/Macro coding. Can someone advise on how can I adjust width of pivot value - alternate columns using VB macro?

The pivot table has 2 data points under 'Values' and I want one of the columns to be of certain fixed width (2 characters) and the other ones to be of 10 characters. So every alternate column should be 2 and 10 characters respectively.

If I can set this in pivot, without VB Macro, that is fine too!

Best Regards,

stct80.
 
Last edited:

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Actually, just found the solution in mrexcel forums, so pls ignore the post & Thank you!

stct80.....

Hello and Greetings!

I am relatively new to the VB/Macro coding. Can someone advise on how can I adjust width of pivot value - alternate columns using VB macro?

The pivot table has 2 data points under 'Values' and I want one of the columns to be of certain fixed width (2 characters) and the other ones to be of 10 characters. So every alternate column should be 2 and 10 characters respectively.

If I can set this in pivot, without VB Macro, that is fine too!

Best Regards,

stct80.
 
Upvote 0

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

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