Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Brent E
 
Posts: n/a
Default I Need VBA Assistance for EOF

Good afternoon,

I need to know a VBA command that will look at all cells in Column B until
end of file or EOF. I tried DO UNTIL ... EOF, but didn't seem to work. Is
this valid? Thanks.
  #2   Report Post  
Dave O
 
Posts: n/a
Default

It depends on how your data is populated in column B. You could
instruct Excel to evaluate each cell until a blank cell is encountered
(if the data is contiguous), or run for a given number of repetitions.

Here's an example of code that starts at cell B3, moves down a cell and
evaluates the entry in that cell, and stops when it encounters a cell
with the value "stop".

sub Evaluate_Column_B
range("b3").select
do until activecell.value = "stop"
{{{your process here}}}
activecell.offset(1,0).select
loop
end sub

  #3   Report Post  
Dave O
 
Posts: n/a
Default

Forgot to mention: make sure you type the word "stop" into a cell at
the bottom of your data, or else this will run for all 65,000 rows in
the tab and then create an error.

  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

Brent

Sub findbottom()
ActiveSheet.Cells(Rows.Count, 2).End(xlUp).Select
End Sub


Gord Dibben Excel MVP

On Fri, 25 Feb 2005 13:39:02 -0800, "Brent E"
wrote:

Good afternoon,

I need to know a VBA command that will look at all cells in Column B until
end of file or EOF. I tried DO UNTIL ... EOF, but didn't seem to work. Is
this valid? Thanks.


  #5   Report Post  
Myrna Larson
 
Posts: n/a
Default

The EOF file command has to do with what it says, "file", i.e. it's for
detecting the end of a text file that you are reading with Input, Line Input,
etc.


On Fri, 25 Feb 2005 13:39:02 -0800, "Brent E"
wrote:

Good afternoon,

I need to know a VBA command that will look at all cells in Column B until
end of file or EOF. I tried DO UNTIL ... EOF, but didn't seem to work. Is
this valid? Thanks.


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
Formula assistance required!!! Don Excel Discussion (Misc queries) 4 February 22nd 05 08:34 PM
Need VBA assistance for Excel Open Dialogue box Brent E Excel Discussion (Misc queries) 2 February 7th 05 07:41 PM
Drop Down Help Assistance is very confusing. Can someone help me. Erin Excel Discussion (Misc queries) 1 January 7th 05 03:24 PM
Turn off Assistance pane in Excel Petra Excel Discussion (Misc queries) 1 December 1st 04 02:19 AM
Need assistance with cell formatting jeri_g Excel Worksheet Functions 1 November 8th 04 09:20 PM


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