+ Reply to Thread
Results 1 to 5 of 5

IF Statement returning 0

  1. #1
    Registered User
    Join Date
    07-15-2012
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    55

    IF Statement returning 0

    I have a multiple IF statement and im getting a return value of 0.
    What im doing is checking finding the 1st cell with a value in them but i am checking over worksheets rather than on the same sheet.
    So i have 15 worksheets in the 1st 14 im going to have a league table and on the 15th im going to have the most current table. So im using the IF statement and i want it to check eg sheet 14 and if that is blank i want it to keeping looking down the sheets until it finds the date and then display this on the 15th sheet. Then also on this 15th sheet im using VLOOKUP so pull data across.
    This is the formula that is giving me the 0 instead of a name
    =IF('Tue AM'!B9="",'Mon PM'!B9,IF('Mon PM'!B9="",'Mon AM'!B9,IF('Mon AM'!B9="",Sunday!B9)))

    i have attached a sheet as my explanation is not fantastic
    Open Golf Price Record test.xlsm

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: IF Statement returning 0

    maybe
    IF('Tue AM'!B9<>"",'Tue AM'!B9,IF('Mon PM'!B9<>"",'Mon PM'!B9,if('Mon AM'!B9<>"",'Mon AM'!B9,Sunday!B9)))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    07-15-2012
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    55

    Re: IF Statement returning 0

    That seems to have worked thanks!
    What is the difference between <>"" and =""?

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: IF Statement returning 0

    <> means does not =
    its easier to test for true than test for false =if(something,true,false)for the purpose of telling the if what to do if false
    Last edited by martindwilson; 07-16-2012 at 08:55 AM.

  5. #5
    Registered User
    Join Date
    07-15-2012
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    55

    Re: IF Statement returning 0

    Thanks im even more confused now.
    As the cell Tue AM'!B9 is blank.
    Hence i thought if i Tue AM'!B9="" was blank it would pull the data in from Mon PM!B9 and so on until it finds a cell with some data.
    Your amend works great but my next problem is that once i have added data to a new sheet it is not reordering the data on the overall sheet
    in the highest in the table 1st

+ 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