+ Reply to Thread
Results 1 to 2 of 2

Thread: Lookup or Macro ? - Not sure which is best?

  1. #1
    Registered User
    Join Date
    04-10-2006
    Location
    Somerset
    MS-Off Ver
    MS Office 2007
    Posts
    96

    Lookup or Macro ? - Not sure which is best?

    Hi,

    In my work, we use spreadsheets which have the same content and repeat a lot.

    The thing is that whilst the majority replicates, the content is not in the same position on each & every worksheet.

    We have bills of quantites to price. The detail/description is provided in column A (and normally over approx 400 rows) and the pricing is normally covered in column D.

    Each bill may have the similar detail/description in column A but it is NOT exact.

    What I am trying to achieve, is to be able to use an already priced Bill as a template, then, use a Macro ? or Lookup? (or anything else that may handle the job) to identify the content in column A (in otherwords, match the detail/description), returning the price in column D, it having recognised that the content in say column A matches in the already priced bill and returns the correct price per item in column D.

    I've attached a worksheet which will help explain better.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    6,566
    Hi,

    As simple VLOOKUP() will work perfectly well. It would be preferable if all your item descriptions had some sort of code, but there is nothing to stop you using the item text as the subject of the VLOOKUP(). Of course this does mean that the item descriptions have to be spelled exactly the same, which is why I suggest having a code would be better.

    However, assuming your Example B Bill is on Sheet2, (with the item appearing in A6, just enter

    =VLOOKUP(A6,Sheet1!A:D,4,FALSE)
    It will work just as well with the original Bill in a different workbook. The function would just need modifying to include the book name.

    HTH

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Lookup function
    By Cramer19 in forum Excel Programming
    Replies: 35
    Last Post: 01-06-2008, 06:44 PM
  2. vba to change macro file name
    By blackstar in forum Excel Programming
    Replies: 6
    Last Post: 12-01-2007, 11:14 PM
  3. Cell lookup and output issue...
    By yellephant in forum Excel Worksheet Functions
    Replies: 1
    Last Post: 05-21-2007, 11:27 AM
  4. Conditional formatting macro (highlight macro)
    By c991257 in forum Excel Programming
    Replies: 2
    Last Post: 05-09-2007, 02:46 PM
  5. Need macro to move down & select next visible row
    By Fartnuckles in forum Excel Programming
    Replies: 3
    Last Post: 09-25-2006, 10:02 PM

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.2.0