+ Reply to Thread
Results 1 to 6 of 6

Adding IF function to existing (complex) Formula

  1. #1
    Registered User
    Join Date
    04-24-2013
    Location
    Jersey, Channel Islands
    MS-Off Ver
    Excel 2010
    Posts
    7

    Adding IF function to existing (complex) Formula

    Greetings

    I would like to add an IF function to an existing fomula but I am having trouble with exactly where I can enter it, or even if this is the correct formula I should be using. The IF function I am trying to add is the:

    IF blank return blank (instead of 0).

    My existing formula is:

    =IF(ROWS(A$12:A12)>Transactions!$G$2,"",INDEX(Transactions!A$8:A$13,SMALL(IF(Transactions!$A$8:$A$13>=Transactions!$E$2,IF(Transactions!$A$8:$A$13<=Transactions!$E$3,ROW(Transactions!$A$8:$A$13)-ROW(Transactions!$A$8)+1)),ROWS(A$12:A12))))

    This is my 1st post and I am some what of a noobling with lengthy Formulas, so I will apologise in advance for any potential faux pas. I would go into a bit more detail on the above formula but I have a feeling that i could come accross as condescending.

    Thanks in advance

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Adding IF function to existing (complex) Formula

    Technique for nesting formulas..

    1. Assuming your function is in cell A1
    2. Put your A1 dependent IF function in B1.......... = IF(A1<>"",A1,"")
    3. Replace all instances references to A1 with your function. (Copy paste in the formula bar)
    Elegant Simplicity............. Not Always

  3. #3
    Registered User
    Join Date
    04-24-2013
    Location
    Jersey, Channel Islands
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Adding IF function to existing (complex) Formula

    Thanks Andy for the prompt resonse. I am copying this existing formula from cell A12 accross to cell M12 and down over a number or rows. Is there anywhere in particular that I should copy and paste the IF(A1<>"",A1,"")? I have tried entering at the beginning and at the end but to no avail.

    I am extracting data from another sheet "Transactions" using the existing formula. It's the blanks on the Transactions sheet that I would like to return as blanks on the "expense claim Form" sheet. Do I need to reference the cells that are blank on the Transactions sheet, or the cells that end up blank on the Expense claim form sheet? Eg: IF cells on Transaction sheet are blank, return blank on Exp Claim Form. OR do I enter a formula that says if the return is blank (0) on the Exp Claim Form, enter blank?

  4. #4
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Adding IF function to existing (complex) Formula

    So if you're moving the function to M12 then
    1. Find a spare column row 12 on the same worksheet and insert = IF(M12="","",M12)

    2. Replace references to M12 with your main function e.g
    = IF(IF(ROWS(A$12:A12)>Transactions!$G$2,"",INDEX(Transactions!A$8:A$13,SMALL(IF(Transactions!$A$8:$A$13>=Transactions!$E$2,IF(Transactions!$A$8:$A$13<=Transactions!$E$3,ROW(Transactions!$A$8:$A$13)-ROW(Transactions!$A$8)+1)),ROWS(A$12:A12))))="","",IF(ROWS(A$12:A12)>Transactions!$G$2,"",INDEX(Transactions!A$8:A$13,SMALL(IF(Transactions!$A$8:$A$13>=Transactions!$E$2,IF(Transactions!$A$8:$A$13<=Transactions!$E$3,ROW(Transactions!$A$8:$A$13)-ROW(Transactions!$A$8)+1)),ROWS(A$12:A12)))))

    Once you've done that and verified it calculates correctly, you can just copy and paste down the rows..

  5. #5
    Registered User
    Join Date
    04-24-2013
    Location
    Jersey, Channel Islands
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Adding IF function to existing (complex) Formula

    Ok got it and it's looking good.

    That's great stuff Andy, thanks for your help.

  6. #6
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Adding IF function to existing (complex) Formula

    Very welcome

+ 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