+ Reply to Thread
Results 1 to 6 of 6

#REF stuffing up my IF Statement

  1. #1
    Registered User
    Join Date
    07-08-2012
    Location
    Melbourne Australia
    MS-Off Ver
    Excel 2003
    Posts
    79

    #REF stuffing up my IF Statement

    With the help of theses forums i've been able to create what I think is a masterpiece!

    But when I run my macro and it returns #REF (which is a result im actually ok with) it throws up an error in my if statement.

    So I run XXXXX, this brings across any standing instructions, then i change a value in any cell, say for example I7 i say "Yes" actioned.

    the Worksheet_Change sub cracks the sads

    I was thinking I might have to include ELSE statements, but im not sure how or if it will even work

    Example attached: Corporate Action History Master.xlsm


    Below is an extract where it errors

    Any thoughts please


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: #REF stuffing up my IF Statement

    Hi

    Why don't you change the NA() part of the formula to either be a blank ("") or, if you really want to have a non error result, then N/A. I think that would resolve the issue.

    rylo

  3. #3
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: #REF stuffing up my IF Statement

    Hi,

    I can't seem to trigger any errors. Here is the adjusted code that I used:

    Please Login or Register  to view this content.
    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  4. #4
    Registered User
    Join Date
    07-08-2012
    Location
    Melbourne Australia
    MS-Off Ver
    Excel 2003
    Posts
    79

    Re: #REF stuffing up my IF Statement

    hmm trying both but still failing Error 2023

    Rylo i actually used an adaptation of your formula (still using the other one for paydate) to to bring across the comment value

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: #REF stuffing up my IF Statement

    Hi

    Try making the (n/a) into a string in the formula like so ""(n/a)""

    rylo

  6. #6
    Registered User
    Join Date
    07-08-2012
    Location
    Melbourne Australia
    MS-Off Ver
    Excel 2003
    Posts
    79

    Re: #REF stuffing up my IF Statement

    argh that was so simple! thanks rylo

+ 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