+ Reply to Thread
Results 1 to 3 of 3

Help With a Formula

Hybrid View

edrachel Help With a Formula 02-08-2007, 02:19 PM
VBA Noob Hi, You seem to have the... 02-08-2007, 02:28 PM
Paul So if F6 < 5, you want your... 02-08-2007, 02:35 PM
  1. #1
    Registered User
    Join Date
    01-09-2004
    Location
    Palm Bay, Fl.
    Posts
    13

    Question Help With a Formula

    I am trying to develop a formula that will return two possible answers.
    I want it to look in cell F6. If the number in F6 is less than 5, then I want it to return a 1. If the number in F6 is 5 or greater then I want it to return the number on sheet DED!A1:A11,2. How do I do this. I have tried the following:
    =IF(F6<5,1,IF(F6>5,(DED!A1:A11,2,false)) Can anyone fix this for me?? What am I doing wrong? Thanks.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    You seem to have the makes of a Vlookup.

    Are you after something like this

    =IF(F6<5,1,IF(F6>5,(VLOOKUP(F6,DED!$A$1:$B$11,2,FALSE))))

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    So if F6 < 5, you want your cell to show "1". If F6 > 5, your cell should show the value of "DED!A1:A11,2"? I'm not sure what that means. Are you looking for the SUM of the values in A1:A11? Are you trying to do a VLOOKUP from that other sheet based on the value in F6, and getting that value returned?

    If you simply wanted the value from DED!A1, the formula would be:

    =IF(F6<5,1,DED!A1)

    Another question - what do you want to show when F6=5. The IF statement (above or yours) does not account for that. It could easily be incorporated, though.

    EDIT: Looks like Noob beat me. That'll teach me not to refresh my browser.

+ 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