Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default VB to go across and then select columns

Hi there,

Situation...

Data in Col a to d, and a total in column bz.

I need formulae to hide cols e to by, (bz is fixed, but a - d could vary
either more or less columns...)



Thanks!!!

Regards

D

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default VB to go across and then select columns

Range("E1:BY1").EntireColumn.Hidden = True

Charles

Darin Kramer wrote:
Hi there,

Situation...

Data in Col a to d, and a total in column bz.

I need formulae to hide cols e to by, (bz is fixed, but a - d could vary
either more or less columns...)



Thanks!!!

Regards

D

*** Sent via Developersdex http://www.developersdex.com ***


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default VB to go across and then select columns

Thanks Charles,

Unfortunately e1 is not fixed, it will always change - hence the need
for some VB

*** Sent via Developersdex http://www.developersdex.com ***
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default VB to go across and then select columns

What is the criteria to choose Column B-E?

Charles

Darin Kramer wrote:
Thanks Charles,

Unfortunately e1 is not fixed, it will always change - hence the need
for some VB

*** Sent via Developersdex http://www.developersdex.com ***


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default VB to go across and then select columns

Darin,
How do you determine which column to start to hide the data in??
Is it the same for every row?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default VB to go across and then select columns

Yes Steve, its the same for every row. I think using row 1 would be a
good idea...



*** Sent via Developersdex http://www.developersdex.com ***
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default VB to go across and then select columns

ok...then in your spreadsheet. how do you determine what column do you
want to start to hide the data at...is there something special in the
first column that you want hide that will distinguish it from the data
you want to show?

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default VB to go across and then select columns

Steve,

The first column to hide is blank

So a - d will have values in, but Column E to BY will be blank. (BZ has
values in)

Appreciate your help, signing off now, but if u would lik to u can mail
me at with other questions...

Thanks!!

Darin

*** Sent via Developersdex
http://www.developersdex.com ***
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default VB to go across and then select columns

Range(Range("BY1").End(xlToLeft).Offset(0,1),Range ("BY1")).EntireColumn.Hidden
= True

Charles

Darin Kramer wrote:
Steve,

The first column to hide is blank

So a - d will have values in, but Column E to BY will be blank. (BZ has
values in)

Appreciate your help, signing off now, but if u would lik to u can mail
me at with other questions...

Thanks!!

Darin

*** Sent via Developersdex
http://www.developersdex.com ***


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
Select lowest value from 3 columns ub67 Excel Worksheet Functions 7 March 3rd 09 06:32 PM
select columns by variable Jack Excel Programming 4 November 29th 05 09:09 PM
Select second columns only My View Excel Discussion (Misc queries) 3 July 7th 05 11:37 PM
How to select columns in loop Bob Phillips[_7_] Excel Programming 0 January 18th 05 04:10 PM
Select from Columns ten Excel Programming 1 August 13th 03 05:56 PM


All times are GMT +1. The time now is 01:24 PM.

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

About Us

"It's about Microsoft Excel"