ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VB to go across and then select columns (https://www.excelbanter.com/excel-programming/371616-vbulletin-go-across-then-select-columns.html)

Darin Kramer

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 ***

Die_Another_Day

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 ***



Darin Kramer

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 ***

Die_Another_Day

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 ***



stevebriz

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?


Darin Kramer

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 ***

stevebriz

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?


Darin Kramer

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 ***

Die_Another_Day

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 ***




All times are GMT +1. The time now is 06:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com