+ Reply to Thread
Results 1 to 3 of 3

Adding another IF to formula

  1. #1
    Forum Contributor
    Join Date
    01-11-2007
    Posts
    127

    Adding another IF to formula

    =IF(OR(Q118={"$","€"}),VLOOKUP(E118,[RefHidden_120112.xlsm]Ref!$BY$5:$CB$60,MATCH(Q118,[RefHidden_120112.xlsm]Ref!$BY$3:$CB$3,0)),"1.00")

    I want to adapt this formula for it to return "--" IF Q118="". I am not sure of the syntax to add the extra IF. Thanks.

    Dan

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,027

    Re: Adding another IF to formula

    It always has same syntax:

    =IF(criteria, result if True, result if False /*may be omitted*/)

    So in your case:

    =IF(Q118="", "--", formula)

    or

    =IF(Q118="", "--", IF(OR(Q118={"$","€"}),VLOOKUP(E118,[RefHidden_120112.xlsm]Ref!$BY$5:$CB$60,MATCH(Q118,[RefHidden_120112.xlsm]Ref!$BY$3:$CB$3,0)),"1.00"))
    Never use Merged Cells in Excel

  3. #3
    Forum Contributor
    Join Date
    01-11-2007
    Posts
    127

    Re: Adding another IF to formula

    Thanks. That's where I got confused. I didn't realise that the originally formula was just an IF statement with other functions inside. I have laid out you suggestion like so:

    =IF(Q118="", "--",
    IF(OR(Q118={"$","€"}),VLOOKUP(E118,[RefHidden_120112.xlsm]Ref!$BY$5:$CB$60,MATCH(Q118,[RefHidden_120112.xlsm]Ref!$BY$3:$CB$3,0)),
    "1.00"))

    so I can see make sense of it. Will it increase the size of my excel files and make my spreadsheets slow if I enter formulas like this instead of one long string? Thanks again.

+ 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