+ Reply to Thread
Results 1 to 8 of 8

Help on adding an IFERROR/IF function to an existing formula.

  1. #1
    Registered User
    Join Date
    03-08-2016
    Location
    South Africa
    MS-Off Ver
    2010
    Posts
    26

    Question Help on adding an IFERROR/IF function to an existing formula.

    Help on adding an IFERROR/IF function to an existing formula.

    Okay I have attached my document if you open it you will see I have formulas already in place (the age in words column does not work) that works from the ID Number column.

    What I want Excel to do is the cells that are red to leave the cells open and not give me an error or wrong value.

    The reason why the line for MAX is giving me errors and wrong values, are because he has a passport number and not an ID number.

    Can you also help me with the “Age in Words” column please if it is possible with an IF Function?

    Thanks in advance for your help…
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help on adding an IFERROR/IF function to an existing formula.

    Hi,

    For the #VALUE results wrao the formula in an IFERROR.
    e.g.
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    For F4:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I've added Microsoft's User Defined Function 'SpellNumber' hence your workbook is now a .xlsm file.
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,410

    Re: Help on adding an IFERROR/IF function to an existing formula.

    The "Age in Words" uses a VBA macro "SpellNumber" which is not present in the sheet.

    in E3

    =IFERROR(DATE(LEFT(D3,2),MID(D3,3,2),MID(D3,5,2)),"")

    in G3

    =IFERROR(INT((TODAY()-DATE(LEFT(D3,2)+1900,MID(D3,3,2)+0,MID(D3,5,2)+0))/365.25),"")

    in J3

    =IFERROR(DATE(YEAR(E3)+DATEDIF(E3,I3,"y")+1,MONTH(E3),DAY(E3)),"")

    in K3

    =IFERROR(DATEDIF(I3,J3,"d"),"")

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Help on adding an IFERROR/IF function to an existing formula.

    IFERROR added to your formulas in the attached.

    As for spelling out numbers as words, I'm not even sure why you would want to do that considering the numbers are right there and far easier to read than long winded word versions.
    Having said that it is possible, although not straightforward. Perhaps the link below will help...
    https://support.microsoft.com/en-us/kb/213360

    BSB
    Attached Files Attached Files

  5. #5
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Help on adding an IFERROR/IF function to an existing formula.

    Hi
    To get a spell number see this link https://support.microsoft.com/en-us/kb/213360
    (How to convert a numeric value into English words in Excel)

  6. #6
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Help on adding an IFERROR/IF function to an existing formula.

    In E3, and copied down.

    =IFERROR(DATE(LEFT(D3,2),MID(D3,3,2),MID(D3,5,2)),"")

    For the other columns, add an extra IF to each formula in row 3, then copy them down.

    =IF(E3="","",existing formula)

    This will blank the rest of the row when column E is blank as the result of an error.

  7. #7
    Registered User
    Join Date
    03-08-2016
    Location
    South Africa
    MS-Off Ver
    2010
    Posts
    26

    Re: Help on adding an IFERROR/IF function to an existing formula.

    Thanks allot everyone I appreciate the help.

    The reason why the age number and words must be there is unknown to me, the company I work for has given the instruction for it to be like that and it is not my personal preference in this matter.

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help on adding an IFERROR/IF function to an existing formula.

    Glad to have helped and thanks for the rep.

+ 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. Replies: 3
    Last Post: 01-13-2016, 12:05 PM
  2. Adding an additional IF function to my existing formula to return a blank
    By xmann21 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-29-2015, 09:52 AM
  3. [SOLVED] Adding IF function to an existing formula (replace call with 0% if range is blank)
    By jholiday78 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-25-2015, 12:12 PM
  4. [SOLVED] Adding IFERROR IF MATCH Formula to each row
    By MICowboy13 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-15-2014, 02:47 PM
  5. Help adding Iferror to existing formula
    By rwmeis in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-27-2013, 12:33 PM
  6. Adding in a multiplication function to an existing macro
    By 6423joel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-26-2013, 06:02 PM
  7. Adding IF function to existing (complex) Formula
    By NDRYNWA in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-24-2013, 06:56 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