+ Reply to Thread
Results 1 to 5 of 5

inserting value based on another cell

  1. #1
    Registered User
    Join Date
    10-02-2012
    Location
    Harrogate, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    inserting value based on another cell

    Hi there

    This is probably a dumb question but I have been asked to make it so that if you select one thing in a table it automatically puts a value in another cell. I have attempted to do this using the v-look up function but with no success. Attached is the spreadsheet with sample data in.

    Column E is the Reason for the Award. There are 3 possible reasons (call quality, displaying core values and member of PSP winning team). Each of these gives a set value of points which I want to populate in column I. I have so far manually inputted them but this wants to be automated.

    All help will be gratefully received.

    Thanks

    Monika
    Attached Files Attached Files
    Last edited by monika_s; 10-23-2013 at 07:46 AM. Reason: Resolved :)

  2. #2
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: inserting value based on another cell

    Hi Monika
    First of all may I say that no question is ever classed as "Dumb" as you put it. The purpose of this forum is to help one another, that's what the forum exists for. A question is only easy if you know the answer, even experts sometimes cannot see the wood for the trees and come to this forum for another point of view.
    Now getting to your query, there is an error in your formula.
    Your formula is: =VLOOKUP(E4,'v-look up table'!A1:B3,I4,)
    and it should be: =VLOOKUP(E4,'v-look up table'!A1:B3,2)
    This should be copied to cell I4 and copied down.
    You have I4 to return a value from but it is outside the range you are searching and it should be a column number not a cell reference. The number "2" is the second column of the range you are searching and contains the value you want to return.
    Also not all values have been created for all the entries in the "Reason For Award" column which is why you are getting "#N/A" appear when you copy the formula down the column. This can be hidden if you wish as follows:
    Replace: =VLOOKUP(E4,'v-look up table'!A1:B3,2)
    With: =IF(ISNA(VLOOKUP(E4,'v-look up table'!A1:B3,2)),"",VLOOKUP(E4,'v-look up table'!A1:B3,2))
    This should be copied to cell I4 and copied down.
    Hope this helps. If you need further help then please come back to us.
    Good luck.
    Tony

  3. #3
    Registered User
    Join Date
    10-02-2012
    Location
    Harrogate, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Red face Re: inserting value based on another cell

    Thank you so much Tony!

    Amazing! I can't tell you how much head scratching I was doing this morning. There is nothing worse than falling out with Excel as it is usually my trusty friend. Your explanation is spot on.

    Thanks again

    Monika

  4. #4
    Valued Forum Contributor
    Join Date
    02-05-2013
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2013
    Posts
    571

    Re: inserting value based on another cell

    I see you use excel 2007, you can IFERROR Function, so the code can be like this (modify formula from ARGK):

    Please Login or Register  to view this content.
    Click (*) if you received helpful response.

    Regards,
    David

  5. #5
    Registered User
    Join Date
    10-02-2012
    Location
    Harrogate, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: inserting value based on another cell

    Thanks SDCh I shall give that a try.

    Monika

+ 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. Help inserting image based on URL from cell
    By Sparky42 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-12-2011, 11:53 AM
  2. Help inserting image based on URL from cell
    By Sparky42 in forum Excel General
    Replies: 0
    Last Post: 04-08-2011, 03:01 PM
  3. Inserting rows based on cell value
    By iwontbelost in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-17-2009, 07:45 AM
  4. Inserting a filename in a formula based on a cell
    By xxchrisukxx in forum Excel General
    Replies: 2
    Last Post: 08-15-2007, 08:40 AM
  5. [SOLVED] Inserting row based on value in cell in Column C
    By Anonymous CHief in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-09-2005, 09:06 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