+ Reply to Thread
Results 1 to 8 of 8

IF statement to return value from another cell.

  1. #1
    Registered User
    Join Date
    03-31-2010
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    4

    IF statement to return value from another cell.

    Hello,

    I need some help with a worksheet. I have a worksheet that I can key in numbers in A1 and A2 with a formula in A3 for the total. I have D1 thru D31 that if the total in A3 matches or is close I want it to return the answer from cells C1 thru C31.

    Anyone know how I can accomplish it?

    Hope this makes sense.
    Last edited by Ghornet54; 04-01-2010 at 11:36 AM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Worksheet Help

    What do you mean by 'close'? What is 'the answer' you are expecting? Do you want to sum the values?

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    03-31-2010
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Worksheet Help

    No, I don't want to sum the values. In the cells D1 thru D31, there are values. I would like excel to lookup the answer and return the answer from the corresponding cells C1 thru C31. I shouldn't have said "close".

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Worksheet Help

    Maybe like this: =INDEX(C1:C31,MATCH(A3,D1:D31,0))

    Dom

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Worksheet Help

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Registered User
    Join Date
    03-31-2010
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: IF statement to return value from another cell.

    Maybe I should post what I'm actually trying to accomplish.

    In this example, the .75 should return 37.

    Does this make better sense?[

    ATTACH]69600[/ATTACH]
    Attached Files Attached Files
    Last edited by Ghornet54; 04-01-2010 at 10:55 AM.

  7. #7
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: IF statement to return value from another cell.

    You will need to sort the values in columns C:D in descending order rather than ascending but I think this should work: =INDEX(C1:C31,MATCH(A3,D1:D31,-1))

    Dom

  8. #8
    Registered User
    Join Date
    03-31-2010
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: IF statement to return value from another cell.

    GREAT JOB!!!! Domski. Works wonderful!!!! Really appreciate your help!

+ 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