Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default unknown column length

Stating an absolute range can sometimes not be possible due to unknowns.
Using (F:F) for instance can be a useful alternative as it looks at the
entire column, not just part of it.
However, is it possible to specify a start cell to search down from?
i.e.(F$10:F) This q is for both formulae and vb.
Thanks,
--
Traa Dy Liooar

Jock
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default unknown column length


You should check out chip pearson website. He has a lot of good
methods

'Excel Redirect' (http://www.cpearson.com)


You can find a range and set a variable to the range. The END method
in VBA works the same has the hot keys Shift-Cntl-down Arrow

If you don't have any blank cells

LastRow = Range("F10").end(xldown).row
Set MyRange = Range("F10:F" & LastRow)


If you have blank cells

LastRow = Range("F" & rows.Count).end(xlup).row
Set MyRange = Range("F10:F" & LastRow)


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=145584

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default unknown column length


rng = Cells(Rows.Count, "F").End(xlUp).Row

with Range("F10:F" & rng)
.......
end with



On Oct 19, 4:55*pm, Jock wrote:
Stating an absolute range can sometimes not be possible due to unknowns.
Using (F:F) for instance can be a useful alternative as it looks at the
entire column, not just part of it.
However, is it possible to specify a start cell to search down from?
i.e.(F$10:F) This q is for both formulae and vb.
Thanks,
--
Traa Dy Liooar

Jock


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default unknown column length

The below will refer the cells F10:F65536
=OFFSET(F1,9,0,65536-9,1)

'to sum that range
=SUM(OFFSET(F1,9,0,65536-9,1))

'VBA to refer the range.
Range("F10:F" & Rows.Count)

Msgbox Range("F10:F" & Rows.Count).Address


If this post helps click Yes
---------------
Jacob Skaria


"Jock" wrote:

Stating an absolute range can sometimes not be possible due to unknowns.
Using (F:F) for instance can be a useful alternative as it looks at the
entire column, not just part of it.
However, is it possible to specify a start cell to search down from?
i.e.(F$10:F) This q is for both formulae and vb.
Thanks,
--
Traa Dy Liooar

Jock

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 string of unknown length in a string of unknown length, Help! Hankjam[_2_] Excel Discussion (Misc queries) 8 July 3rd 08 06:49 PM
Unknown column length Jock Excel Programming 4 October 29th 07 02:28 PM
SMALL() on unknown length of list [email protected] Excel Worksheet Functions 9 November 1st 06 02:03 PM
How do I sum a column of unknown length using a macro SandyPaul Excel Programming 1 October 26th 05 09:15 PM
Sum unknown length column data in VBA John[_80_] Excel Programming 3 June 26th 04 03:32 AM


All times are GMT +1. The time now is 03:19 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"