LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Apply format to whole column depending on row 1 contents

This is what I want the script to do, but how do I write it?

' ===============================
Look through ActiveSheet.UsedRange

if <the first cell in column contains (text1, text2 or text3)
whole column
width: auto
top cell only in column
text direction: horizontal
text align: h-left, v-bottom
rest of cells in column
text direction: horizontal
text align: h-left, v-middle

if <the first cell in column contains anything else
whole column
width: 4
top cell only in column
text direction: vertical
text align: h-center, v-bottom
rest of cells in column
text direction: horizontal
text align: h-right, v-middle

move to next column and repeat until reached the end of
ActiveSheet.UsedRange
' <===============================

Hope this is clear!

Kind Regards,
Samuel Harmer
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I insert a picture depending on the contents of another cell? JP Excel Discussion (Misc queries) 1 May 11th 10 11:06 AM
IF Function (Possibly) to Apply a Value Depending on Value Toria Excel Worksheet Functions 5 August 23rd 09 08:02 PM
How can I change a picture depending on a cell's contents LEP Excel Discussion (Misc queries) 1 December 23rd 07 12:16 AM
How to apply an automatic format to a column? AussieBumBxl Excel Worksheet Functions 2 August 18th 07 03:23 PM
How do I change a buttons contents depending on a cells contents? Kosh42|EFG Excel Programming 2 February 16th 05 02:39 PM


All times are GMT +1. The time now is 07:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"