+ Reply to Thread
Results 1 to 1 of 1

Fill down formula using VBA to varying column lengths

  1. #1
    Registered User
    Join Date
    06-21-2004
    Posts
    8

    Smile Fill down formula using VBA to varying column lengths

    Hello,

    I am using Excel97 on WINNT.

    I am trying to develop an automated method for the formatting of a daily report extracted as a csv file and needing to be cleaned up before sending out to users. In column E of this report is a list of codes representing company names. I have created a VLOOKUP table in a separate sheet and everything works fine with returning the correct names etc.

    My problem is that the daily report can range from a few rows of data to several hundred rows and this has the potential to grow into more than a thousand per day.

    Provided I enter the VLOOKUP formula manually then fill down the helper column to the last row there's no problem. I would like to automate this feature using VBA but don't know how to write the code so it knows where to stop. I can make a guess that it is unlikely to go past 2000 rows per day but this creates an unnecessary mess.

    I have automated all of the other things I need to do with this report. I would like to make this daily exercise as painless as possible and available for anyone in my area to do if I am not at work.

    Could someone please assist with the code for this? The VLOOKUP I'm using is as follows:
    =VLOOKUP(E2,'C:\ZCMP_Listing.xls'!Company_Name,2)

    Any help would be gratefully received.

    **EDIT** I managed to work this one out. Suffering BIG mental blank after too much time away from any development and too much continuing Christmas cheer. DUUHHH!

    Many thanks.

    Lee.
    Last edited by Lee Jeffery; 01-30-2005 at 12:39 AM. Reason: Found the answer

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1