LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default End Of File - For use in Formulas

I am working with about 15 large files that I am importing
and performing various functions. Needless to say my
system slows down like you would not believe and I am
trying to cut down my overhead. Here is what I need to
do. I have a File that varies in length from being Empty,
to One Row of Data, to sometimes over 12000 rows.

I need to run various formulas including about 9 VLOOKUP
formulas. I need to find the Last row using a Macro (Ctrl-
Down-Arrow, or Ctrl-End), and reference that number in my
formulas (see below, replacing M65536 with the Last Row
Number found)

Set frng = Range("M65536:M" & Range("M2").End(xlUp).Row)
With frng
.Formula = "=VLOOKUP(RC1,'[9006 Name Report.xls]Names'!
C1:C4,3,FALSE)"
.Formula = .Value
End With

I need to replace the M65536 with the last row number in
the document. This will save enormous amounts of time.

In addition if the file is empty, I want to do a
Workbook.add and save as "c:\temp\NEW Name Report.xls"

I have received help on this issue in the past and am
trying to customize the information provided to my exact
needs. I appreciate all those individuals who have gotten
me this far.

Any and all assistance will be greatly appreciated.

 
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
Linking to file, some formulas work only if file is open ST Matt Links and Linking in Excel 0 February 17th 11 07:22 PM
Formulas & Dates not working in .xls file AOA Excel Worksheet Functions 1 January 8th 10 04:25 PM
Copying formulas from one file to another JGH Excel Discussion (Misc queries) 1 June 28th 07 06:07 PM
Copying formulas from file to file Jeremy Excel Discussion (Misc queries) 2 April 5th 07 08:12 PM
copying formulas from one file to another Loris Excel Worksheet Functions 2 August 1st 06 11:36 PM


All times are GMT +1. The time now is 08:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"