Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Fomatting based on columns displayed


I am just getting into VBA so excuse me for my total lack of knowldege.
The problem I am having is with formatting. I have a report built with
borders, shading, etc. The report is $'s and units by month. It looks
great but I have been asked to put in views that show just $'s or just
units for the month. This screws up my formatting. Can I have code
that applies borders based on whether or not certain columns are
displayed???

Thanks.


--
rudy
------------------------------------------------------------------------
rudy's Profile: http://www.excelforum.com/member.php...o&userid=33911
View this thread: http://www.excelforum.com/showthread...hreadid=545067

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Fomatting based on columns displayed

Hi Rudy,

you can use simple custom function:

Function ColumnVisible(Target As Range) as boolean
ColumnVisible = Not Target.cells(1,1).Columns.Hidden
End Function

And conditional formatting with formula =columnvisible(a1) with
appropriate formating for visible and hidden column.

Let me know if you need more help.

Regards,
Ivan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Fomatting based on columns displayed


I will give it a try and let you know. Thanks for the help. This site
is very helpful.


--
rudy
------------------------------------------------------------------------
rudy's Profile: http://www.excelforum.com/member.php...o&userid=33911
View this thread: http://www.excelforum.com/showthread...hreadid=545067

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Fomatting based on columns displayed


Ivan,

Sorry but I am a rookie.... do I need to insert that piece of code
into a module and then apply the conditional formatting to tha
appropriate cells in the worksheet??

Thanks.


--
rudy
------------------------------------------------------------------------
rudy's Profile: http://www.excelforum.com/member.php...o&userid=33911
View this thread: http://www.excelforum.com/showthread...hreadid=545067

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Fomatting based on columns displayed

Hi Rudy,

exactly.

Let me know if you have any problems with it.

Regards,
Ivan



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Fomatting based on columns displayed


Thanks! Ivan:)


--
rudy
------------------------------------------------------------------------
rudy's Profile: http://www.excelforum.com/member.php...o&userid=33911
View this thread: http://www.excelforum.com/showthread...hreadid=545067

Reply
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
empty columns not to be displayed Nikhil Charts and Charting in Excel 1 July 3rd 09 05:41 PM
Find All Columns Displayed Dancer Excel Worksheet Functions 2 January 17th 09 03:40 PM
Calculate total $ based on rows displayed by sort DavidP Excel Worksheet Functions 1 December 11th 06 06:48 PM
format decimals displayed based on results widman Excel Discussion (Misc queries) 3 October 17th 06 03:35 PM
How do I set which columns are displayed in File:Open? CindyJK Excel Discussion (Misc queries) 0 December 28th 05 11:43 PM


All times are GMT +1. The time now is 12:27 AM.

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"