+ Reply to Thread
Results 1 to 10 of 10

VLOOKUP and IF, THEN?

  1. #1
    Registered User
    Join Date
    03-14-2016
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    5

    VLOOKUP and IF, THEN?

    I have a simple pricelist in 2 columns showing part number and price. I receive a new sheet every week with updated prices, but the new list may be longer or shorter than the previous one, or include new items. And some prices change and some don't. Is there any way to run a formula so that:

    If the new list includes part numbers from the previous week, then the price will update?

    I can identify new part numbers easily

    The updated information would be most useful in a new column, so I have an historical record of price changes over time.

    I am using Excel 2007

    Thank you

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,528

    Re: VLOOKUP and IF, THEN?

    Several ways of doing this. Could do it with some VBA to automate the process, or manually.

    On the proviso your part numbers are a unique identifier then you can use VLOOKUP or INDEX/MATCH to feed the new values in to the old list. This can be in a new column or an existing one.

    Post some sample data and we can provide tailor made formulas for you.

    BSB

  3. #3
    Registered User
    Join Date
    03-14-2016
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: VLOOKUP and IF, THEN?

    Ok, great.

    Here's a screen shot. Black data is old 'master' list and the red is a sample of the new

    Screen Shot 2016-03-14 at 12.28.00.png

    Thanks!

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,528

    Re: VLOOKUP and IF, THEN?

    In B2 and copy down:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    or
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    BSB

  5. #5
    Registered User
    Join Date
    03-14-2016
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: VLOOKUP and IF, THEN?

    It works perfectly, thank you!!


  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,528

    Re: VLOOKUP and IF, THEN?

    Happy to help.

    If it's a regular action you need to perform then a little macro to take the effort out might be a good idea.
    You could automate the whole thing into a button click and a second or so of processing time.

    BSB

  7. #7
    Registered User
    Join Date
    03-14-2016
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: VLOOKUP and IF, THEN?

    That also sounds good, as yes it is a regular thing that needs doing. How would I go about that?

  8. #8
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,528

    Re: VLOOKUP and IF, THEN?

    Would I be correct in assuming that the weekly price list update is actually a separate file?
    Is there a regular name for that file or could/would it vary week to week?
    Is this separate file stored in a set folder?

    BSB

  9. #9
    Registered User
    Join Date
    03-14-2016
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: VLOOKUP and IF, THEN?

    Yes, it's sent through as a separate excel sheet by email
    The name of the file could vary but it would be no big deal to save it and change the name in that case.
    It can also be saved in set folder, but then would the name have to be changed every week? Or just overwrite the previous one I suppose, if the data is being extracted to the new master list

  10. #10
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,528

    Re: VLOOKUP and IF, THEN?

    Save the two attached files into the same folder.
    Open the "Master" one and click the button.

    The code is very basic so should be easy enough for you to see which bits would need amending to adapt this to your real workbooks.

    The idea is the code will open the new price list (this file can be overwritten as new ones come in), check for new items and add these to the bottom of the list in the master file, then look up the relevant values and close the new list.

    It's not perfect, i.e. it doesn't check if the file new list has already been imported, or indeed if the file is there at all, but it should be a good starting point for you.

    You can view the code by pressing Alt + F11 to bring up the VB Editor.

    Shout for help if any of it needs explaining.

    BSB
    Attached Files Attached Files

+ 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. [SOLVED] When vlookup ragnes is mutiple: How do vlookup value finding occurrence against coresspond
    By silambarasan.J in forum Excel Formulas & Functions
    Replies: 34
    Last Post: 07-07-2015, 09:32 AM
  2. Replies: 0
    Last Post: 12-26-2013, 01:12 PM
  3. Display Cell within VLookup range that excel thinks matches the VLookup Value
    By headachexcelperson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-04-2013, 04:56 PM
  4. [SOLVED] Vlookup is not working and giving =vlookup(B2,$T$2:$U$135,2,false) this kind of values.
    By yogeshsharma1981 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-09-2013, 04:08 PM
  5. vlookup? match? index? MULTIPLE criteria for vlookup search problem....
    By aborg88 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2013, 09:56 AM
  6. Replies: 5
    Last Post: 07-29-2009, 07:53 AM
  7. vlookup function-Can vlookup command find the data from the 5 sheets.
    By Rishab shah in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 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.6.0 RC 1