+ Reply to Thread
Results 1 to 5 of 5

Logic for dynamically determining cell value

  1. #1
    Registered User
    Join Date
    02-26-2012
    Location
    Pittsburgh
    MS-Off Ver
    Excel 2003/2007
    Posts
    18

    Logic for dynamically determining cell value

    Hello - I need to be able to automatically populate one column's (Q) values based on a combination of multiple other column values. Here is the scenario:

    I have a report pulled from the accounting software. Column E is Inv#, Column F is Company Name & Column K is Shipping cost. There are two parts to this report (one sheet though). The top half, has all sales for the month while the bottom half only contains those from the top that included shipping costs. I need to be able to match the records from the bottom to the records at the top and automatically populate Column Q with the appropriate shipping cost for that invoice line item.

    Example:

    Top Report

    E F Q --> this column should be able to grab the shipping value below (Row K) when applicable
    122 Company 0 $0
    123 Company 1 $3
    124 Company 2 $12.67
    125 Company 3 $7.22
    126 Company 4 $0

    Bottom Report

    E F K
    123 Company 1 $3
    124 Company 2 $12.67
    125 Company 3 $7.22


    Im not sure which functions to use or if this can even be done... please help!

  2. #2
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Logic for dynamically determining cell value

    you can use a vlookup to do this:

    where E1 = item number, and $E$10:$K$20 is the range of your bottom report

    =VLOOKUP(E1,$E$10:$K$20,7,0)
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  3. #3
    Registered User
    Join Date
    02-26-2012
    Location
    Pittsburgh
    MS-Off Ver
    Excel 2003/2007
    Posts
    18

    Re: Logic for dynamically determining cell value

    Hi - Thanks for your reply. When I tried the solution you recommended, i am receiving an error (#N/A).

  4. #4
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Logic for dynamically determining cell value

    you will get the #N/A error when it is unable to find a match, can you attach a sample so i can try to figure out where the issue is?

  5. #5
    Registered User
    Join Date
    02-26-2012
    Location
    Pittsburgh
    MS-Off Ver
    Excel 2003/2007
    Posts
    18

    Re: Logic for dynamically determining cell value

    DGagnon - I got it... WITH YOUR HELP! Thanks!!

    =IF(ISNA(VLOOKUP(E3,$E$157:$K$205,6,0)),0,(VLOOKUP(E3,$E$157:$K$205,6,0)))

    Rep+

+ 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