Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Finding a used / filled column

Is there a way to wtite a VB that will look for a column that is used
/ filled? I.E. Colums A4, B4, C4 and D4 are empty. It will skips the
empty columns until it finds and selects an used / filled column, in
this case column E4.

Ogopogo5

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Finding a used / filled column

this code assumes that the empty cells are not formulas returning empty
strings...

dim rng as range

set rng = range("a4")
if isempty(rng) then set rng = rng.end(xltoright)
rng.select



--
HTH...

Jim Thomlinson


"ogopogo5" wrote:

Is there a way to wtite a VB that will look for a column that is used
/ filled? I.E. Colums A4, B4, C4 and D4 are empty. It will skips the
empty columns until it finds and selects an used / filled column, in
this case column E4.

Ogopogo5

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Finding a used / filled column

Hi Jim
I copied and pasted the VB and it works. Thank you very much for helping
out.

Ogopogo5

*** 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
Finding a used / filled column ogopogo5 Excel Programming 0 October 15th 08 09:56 PM
Finding a used / filled rows ogopogo5 Excel Programming 4 October 9th 08 10:50 PM
go to last filled cell in a column shortcut inthestands Excel Worksheet Functions 2 October 30th 06 08:50 PM
Last Filled Column GregR Excel Programming 2 November 18th 05 10:47 PM
finding the no. of rows in a COL filled with numbers, zeros and bl z.entropic Excel Worksheet Functions 14 May 21st 05 11:05 PM


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

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"