+ Reply to Thread
Results 1 to 22 of 22

Formula error for checking cells

  1. #1
    Registered User
    Join Date
    12-27-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    19

    Formula error for checking cells

    All,

    Thank you in advance for helping with this simple issue that for some reason has me stumped.

    =IF($G259<>,(DATE(YEAR($G259)+$H259,MONTH($G259),DAY($G259)-1))),IF(G$259="",($F259<>(DATE(YEAR($F259)+$H259,MONTH($F259),DAY($F259)-1)))

    This is my formula, I basically want it to say:

    If G259 isn't blank then do the sum G259 + H259 (2), if G259 is blank then look at F259, if F259 isn't blank then do F259 + H259 (2), then if F259 and G259 is blank, then blank.

    Ideas?

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,937

    Re: Formula error for checking cells

    pls attach a sample excel file with some example and expected result
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    12-27-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Formula error for checking cells

    It's looking at dates.

    All 3 cells will be a date or blank, the returned figure will be the sum of the date in either F259 or G259 + 2 years.

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,937

    Re: Formula error for checking cells

    =if(g259<>"",edate(g259,h259*12),if(f259<>"",edate(f259,h259*12),""))

  5. #5
    Registered User
    Join Date
    03-12-2014
    Location
    Central Texas
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Formula error for checking cells

    Quote Originally Posted by NickT83 View Post
    =IF($G259<>,(DATE(YEAR($G259)+$H259,MONTH($G259),DAY($G259)-1))),IF(G$259="",($F259<>(DATE(YEAR($F259)+$H259,MONTH($F259),DAY($F259)-1)))
    =IF($g259<>"",(date(year($g259).... etc.
    Just missing a tiny bit, I think.
    Oh! I get it. I need rep--->҉

  6. #6
    Registered User
    Join Date
    12-27-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Formula error for checking cells

    Old4xford - thanks, still doesn't work but I can't see why not.

    nflsales - thanks, does work but H259 is a variable (in this instance 2) and has to be day minus 1, hence the date formula way of working. Any idea why this formula isn't right?
    =IF($G259<>"",(DATE(YEAR($G259)+$H259,MONTH($G259),DAY($G259)-1))),IF(G$259="",($F259<>"",(DATE(YEAR($F259)+$H259,MONTH($F259),DAY($F259)-1)))

  7. #7
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,937

    Re: Formula error for checking cells

    why you are not attaching a sample excel file

  8. #8
    Registered User
    Join Date
    12-27-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Formula error for checking cells

    Information is too confidential and I haven't time to amend to suit. I'll fix it myself.

  9. #9
    Registered User
    Join Date
    12-27-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Formula error for checking cells

    Test page.xls

    Hi nflsales, hopefully this will help you.

  10. #10
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula error for checking cells

    =IF($G259<>,(DATE(YEAR($G259)+$H259,MONTH($G259),DAY($G259)-1))),IF(G$259="",($F259<>(DATE(YEAR($F259)+$H259,MONTH($F259),DAY($F259)-1)))


    Remove the red )
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  11. #11
    Registered User
    Join Date
    12-27-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Formula error for checking cells

    Thanks, it still doesn't work

  12. #12
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula error for checking cells

    Please Login or Register  to view this content.
    Did you tried it?

    In your example it worked for me.

  13. #13
    Registered User
    Join Date
    12-27-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Formula error for checking cells

    I still get a message saying the formula I typed contains an error.

  14. #14
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula error for checking cells

    and what is the result (in your example), if you accept the (by Excel) suggested changes?

  15. #15
    Registered User
    Join Date
    12-27-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Formula error for checking cells

    There are no suggested changes, it's just a generic error message saying:

    For information press help.
    To get assistance press function wizard.
    If you are not entering a formula then avoid starting with an = or -.

  16. #16
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula error for checking cells

    And you did remove the red ) in my formula in #10?

  17. #17
    Registered User
    Join Date
    12-27-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Formula error for checking cells

    I did, yes.

  18. #18
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula error for checking cells

    See the attached file.

    Please post the english version on the forum.

  19. #19
    Registered User
    Join Date
    12-27-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Formula error for checking cells

    Legend. That works perfectly!

  20. #20
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula error for checking cells

    Please post the english version (formula) on the forum.

  21. #21
    Registered User
    Join Date
    12-27-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Formula error for checking cells

    =if($g2<>"",(date(year($g2)+$h2,month($g2),day($g2)-1)),if($f2<>"",(date(year($f2)+$h2,month($f2),day($f2)-1)),""))

  22. #22
    Registered User
    Join Date
    03-12-2014
    Location
    Central Texas
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Formula error for checking cells

    This wasn't marked [SOLVED], so I'm guessing it's still an open issue:

    =IF($g259<>"",(date(year($g259).... etc.
    Just missing a tiny bit, I think.
    =IF($G259<>,(DATE(YEAR($G259)+$H259,MONTH($G259),DAY($G259)-1))),IF(G$259="",($F259<>(DATE(YEAR($F259)+$H259,MONTH($F259),DAY($F259)-1)))


    Remove the red )
    A Combination of the Two works just fine on the example given.

+ 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. Error Checking flags not showing up in cells
    By LibbyK in forum Excel General
    Replies: 1
    Last Post: 07-19-2013, 07:38 AM
  2. HELP! need a lesson on referencing and error checking two cells
    By wiskydiver25 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-13-2012, 01:28 AM
  3. Replies: 7
    Last Post: 02-05-2012, 06:50 PM
  4. checking cells are empty and giving error message
    By Nick_in_Dubai in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2009, 05:17 AM

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