+ Reply to Thread
Results 1 to 9 of 9

Need help simplifying a formula if it's possible

  1. #1
    Registered User
    Join Date
    07-26-2014
    Location
    Nottingham, UK
    MS-Off Ver
    Microsoft Office Professional 2010
    Posts
    32

    Need help simplifying a formula if it's possible

    I currently have this formula:

    =IF(_CUST.TYPE="N",'Att. - 2014'!CJ10*13.8,IF(_CUST.TYPE="C",'Att. - 2014'!CJ10*10.8,IF(_CUST.TYPE="U",'Att. - 2014'!CJ10*13.8,IF(_CUST.TYPE="CU",'Att. - 2014'!CJ10*10.8,IF(ISBLANK(_CUST.TYPE)," ")))))

    Basically:

    If the Cust. Type is "N" or "U" then I want it to multiply [selected cell] by £13.80
    If the Cust. Type is "C" or "CU" then I want it to multiply [selected cell] by £10.80

    Is there a way I can simplify the above formula? Am I able to use the "OR" function? If so, how do I do it?

    Thanks!

  2. #2
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Need help simplifying a formula if it's possible

    =IF(OR(D25="N",D25="U"),13.8,IF(OR(D25="C",D25="CU"),10.8,""))*'Att. - 2014'!CJ10

    Try this in u r sheet

    Punnam

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Need help simplifying a formula if it's possible

    =IF(OR(_CUST.TYPE={"N","U"}),'Att. - 2014'!CJ10*13.8,IF(OR(_CUST.TYPE={"C","CU"}),'Att. - 2014'!CJ10*10.8,""))


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Registered User
    Join Date
    07-26-2014
    Location
    Nottingham, UK
    MS-Off Ver
    Microsoft Office Professional 2010
    Posts
    32

    Re: Need help simplifying a formula if it's possible

    THANK YOU!!!!! I've now solved it! I've done it as:

    =IF(OR(BW10="N",BW10="U"),'Att. - 2014'!EQ10*13.8,IF(OR(BW10="N",BW10="U"),'Att. - 2014'!EQ10*10.8,IF(OR(BW10=0,EQ10=0)," ")))

    And that now seems to work! Couldn't have done it without your help coz I didn't know how to set the OR function!

    THANK YOU!!!!!!

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Need help simplifying a formula if it's possible

    =IF(OR(BW10="N",BW10="U"),'Att. - 2014'!EQ10*13.8,IF(OR(BW10="N",BW10="U"),'Att. - 2014'!EQ10*10.8,IF(OR(BW10=0,EQ10=0)," ")))
    arent those bits in red the same?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Need help simplifying a formula if it's possible

    @ martindwilson
    No , he made mistake
    This Correct one i think
    =IF(OR(BW10="N",BW10="U"),'Att. - 2014'!EQ10*13.8,IF(OR(BW10="C",BW10="CU"),'Att. - 2014'!EQ10*10.8,IF(OR(BW10=0,EQ10=0)," ")))

    Punnam

  7. #7
    Registered User
    Join Date
    07-26-2014
    Location
    Nottingham, UK
    MS-Off Ver
    Microsoft Office Professional 2010
    Posts
    32

    Re: Need help simplifying a formula if it's possible

    Ooops, yeah thanks for pointing that out. I did make a mistake (FYI I'm a 'she' not 'he')

    I copied and pasted the first bit over and forgot to change the second bit from "N" & "U" to "C" & "CU".


    Good spot!
    Thanks!!!

    Sally

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Need help simplifying a formula if it's possible

    then fyi if you have the same cell = different things inside an OR()
    you don't need to keep repeating the cell reference
    =or(b10="x",b10="y",b10="z")
    is the same as
    =or(b10={"x","y","z"})

  9. #9
    Registered User
    Join Date
    07-26-2014
    Location
    Nottingham, UK
    MS-Off Ver
    Microsoft Office Professional 2010
    Posts
    32

    Re: Need help simplifying a formula if it's possible

    Quote Originally Posted by martindwilson View Post
    then fyi if you have the same cell = different things inside an OR()
    you don't need to keep repeating the cell reference
    =or(b10="x",b10="y",b10="z")
    is the same as
    =or(b10={"x","y","z"})
    Thanks for that Martindwilson. I had that many people giving me formula options that I had to make sense of them in a way that would work for me with a bit of trial and error and missed that bit from "sixthsense". So thank you for pointing out that I'd repeated myself (that would have been disastrous once I started inputting figures) and thanks again for simplifying my formula even further for me.



    BIG THANKS to everyone for helping me solve my formula issue!

    Sally

+ 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. [SOLVED] Simplifying a formula
    By pezalmendra in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-22-2013, 11:28 AM
  2. Help simplifying a formula
    By mongoose36 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-24-2013, 02:43 PM
  3. Simplifying a big formula
    By aureliano in forum Excel General
    Replies: 1
    Last Post: 06-22-2012, 08:14 PM
  4. Simplifying a formula
    By MartinW in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-19-2006, 06:55 AM
  5. Simplifying formula
    By m.cain in forum Excel General
    Replies: 1
    Last Post: 03-24-2006, 07:40 AM

Tags for this Thread

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