Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

End of File (Excel File) - VBA

  Asked By: Shawn    Date: Dec 21    Category: MS Office    Views: 6315
  

How do we find out the end of file for a particular excel file? For example, I
have Citi bank statement downloaded in Excel format. I have more than three
accounts. There is no stardard format where we can find out the end of file. If
there is any standard end of message, we can easily find out the cell number to
ascertain the eof. But in this case, we can't find out the stardard format. how
do we find out the end of file.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Sophie Williamson     Answered On: Dec 21

Excel files don't have an end  of file  as such. The contents are stored in a
complex file format, where the different formulas, values, etc, are
scattered through the file.

Is it more that you want to find  the bottom row in a sheet? If so:

Call Cells(Rows.Count, "A").End(xlUp).Select

will select the bottom A cell  that has a value in it. (Change the column if
A can't be relied on to always have something in it.) You can grab the
bottom row number  in a variable if you need to. e.g.

Dim Bottom As Long
Bottom = Cells(Rows.Count, "A").End(xlUp).Row
Call MsgBox(Bottom)

 
Answer #2    Answered By: Hattie Howard     Answered On: Dec 21

Let me check and get back to you if i need any more clarification on that
Have a nice day

 
Didn't find what you were looking for? Find more on End of File (Excel File) - VBA Or get search suggestion and latest updates.




Tagged: