+ Reply to Thread
Results 1 to 5 of 5

VLOOKUP combined with multiplying a fixed cell

  1. #1
    Forum Contributor
    Join Date
    08-10-2006
    Location
    The Netherlands
    MS-Off Ver
    Office for Mac 2016; MS Office 2016 for Windows
    Posts
    110

    VLOOKUP combined with multiplying a fixed cell

    Good day to all!

    My apologies on forehand if this question has been asked / solved in the past, I've searched through the forum but couldn't find any suitable solution.

    Hence my question below. I've attached a file. It has all days of the year in column B (restricted to only January in example file) and a unit price in cell E1.
    There is a macro which is doing a VLOOKUP on date from another file and places the units in the example file (in the cells highlighted in yellow).

    What I would like to have in the yellow cells, is not the number of units pulled from the other file, but the total amount (so the number of units pulled from the other file, multiplied by cell E1).
    How do I write that into a macro / formula?

    Any help is highly appreciated!!

    Kind regards,
    Peter
    Attached Files Attached Files
    Last edited by Bax; 10-18-2012 at 11:19 AM.

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: VLOOKUP combined with multiplying a fixed cell

    it would have been nice to have your Vlookup macro and the other file also.
    If you are already doing the Vlookup and placing the number in the file, all you have to do is get the unit price in cell E1 (you may place it in a variable) and multiply it with the number of units found by your Vlookup.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Forum Contributor
    Join Date
    08-10-2006
    Location
    The Netherlands
    MS-Off Ver
    Office for Mac 2016; MS Office 2016 for Windows
    Posts
    110

    Re: VLOOKUP combined with multiplying a fixed cell

    Hi Pierre,

    Thanks very much for your time to assist me in this case.
    I've attached the original file "Original.xlsx" and the file "Test file.xlsm"
    In the "Original" file, people are entering quantities (just entering numbers in the cell range E7:J372).
    In the "Test file", I have a macro which is pulling these quantities from the "Original" file, but now I just need that last piece whereby these numbers are multiplied by the unit price (row 4 of columns E:J).

    Hope this shines some more light on my problem

    Again, thanks for your time you put into this!!!
    Peter
    Attached Files Attached Files

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VLOOKUP combined with multiplying a fixed cell

    Hi Peter,
    try this code in a standard module of 'Test file.xlsm'
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    08-10-2006
    Location
    The Netherlands
    MS-Off Ver
    Office for Mac 2016; MS Office 2016 for Windows
    Posts
    110

    Re: VLOOKUP combined with multiplying a fixed cell

    Great, thanks very much Nilem!!!

    Case closed ;-)

    Regards,
    Peter

+ 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