+ Reply to Thread
Results 1 to 2 of 2

Updated Function Question

  1. #1
    cwilliams
    Guest

    Updated Function Question

    I thought I would show an example of what exactly I am getting stuck on. I
    am trying to put a rate in A5 based on the following

    If A3 is 240 and A4 is > 0 then look up the rates from Sheet 2 A1:B7 using
    the age in A1 or If A3 is 600 and A4 is >0 then look up the rates from Sheet
    2 C1:D7

    Sheet 1
    A B C
    1 =ROUND((($I$1-J8)-185)/(365),0)
    2
    3 240
    4 1
    5 ??????
    _____________________________________________________

    Sheet 2
    A B C D
    240 600
    1 1 200 1 500
    2 20 300 20 600
    3 30 852 30 585
    4 40 856 40 893
    5 50 159 50 984
    6 60 188 60 848
    7 70 519 70 561
    8
    9
    10


  2. #2
    Valued Forum Contributor Excelenator's Avatar
    Join Date
    07-25-2006
    Location
    Wantagh, NY
    Posts
    333
    If A3 is 240 and A4 is > 0 then look up the rates from Sheet 2 A1:B7 using
    the age in A1 or If A3 is 600 and A4 is >0 then look up the rates from Sheet
    2 C1:D7
    =IF(AND(A3=240,A4>0),VLOOKUP(A1,Sheet2!A1:B7,2,FALSE),IF(AND(A3=600,A4>0),VLOOKUP(A1,Sheet2!C1:D7,2,FALSE),0))
    ---------------------------------------------------
    ONLY APPLIES TO VBA RESPONSES WHERE APPROPRIATE
    To insert code into the VBE (Visual Basic Editor)
    1. Copy the code.
    2. Open workbook to paste code into.
    3. Right click any worksheet tab, select View Code
    4. VBE (Visual Basic Editor) opens to that sheets object
    5. You may change to another sheets object or the This Workbook object by double clicking it in the Project window
    6. In the blank space below the word "General" paste the copied code.

+ 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