+ Reply to Thread
Results 1 to 6 of 6

formula is too long

Hybrid View

  1. #1
    Valued Forum Contributor Rahul Nagar's Avatar
    Join Date
    09-18-2008
    Location
    nasik
    MS-Off Ver
    Excel 2003
    Posts
    465

    formula is too long

    Hello

    Can any one please help me in this,how can in compress the following formula

    =IF(B3="Monthly",IF(B25="Windows 2003 Std",15,IF(B25="Windows 2003 Ent",30,IF(B25="Windows 2008 Data Center ",40,IF(B25="RHEL 5","30",IF(B25="Windows 2008 Web","15",0))))))+(IF(B3="Quarterly",IF(B25="Windows 2003 Std",40,IF(B25="Windows 2003 Ent",75,IF(B25="RHEL 5","89",IF(B25="Windows 2008 Data Center ",120,IF(B25="Windows 2008 Web","45",0))))))+(IF(B3="Semi-Annually",IF(B25="Windows 2003 Std",75,IF(B25="Windows 2003 Ent",140,IF(B25="Windows 2008 Data Center ",200,IF(B25="RHEL 5","149",IF(B25="Windows 2008 Web","90",0)))))))+(IF(B3="Annually",IF(B25="Windows 2003 Std",150,IF(B25="Windows 2003 Ent",300,IF(B25="RHEL 5","299",IF(B25="Windows 2008 Data Center ",400,IF(B25="Windows 2008 Web","180",0))))))))

    Thanks
    Rahul
    Last edited by NBVC; 11-14-2008 at 11:04 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Something like this:

    First set up table on the side that lists the possibilities for B5 and tabulate the corresponding numbers in the next 4 columns.

    Then assuming you put this table in V1:Z100 use formula

    =IF(B3="Monthly",Vlookup(B25,V1:Z100,2,FALSE),0)+IF(B3="Quarterly",Vlookup(B25,V1:Z100,3,False),0)+IF(B3="Semi-Annually",Vlookup(B25,V1:Z100,3,False),0)+IF(B3="Annually",Vlookup(B25,V1:Z100,4,False),0)
    adjust the ranges to suit your data
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    I attached an approach that I would recommend.
    It involves setting up this lookup table in F1:J6
    Version	                  Monthly  Quarterly  Semiannually  Annually
    Windows 2003 Std          15        40         75           150
    Windows 2003 Ent          30        75        140           300
    Windows 2008 Data Center  40       120        200           400
    Windows 2008 Web          15        45         90           180
    RHEL 5                    30        89        149           299
    Then using this formula
    =VLOOKUP(B25,$F$2:$J$6,MATCH(B3,$F$1:$J$1,0),0)
    Does that help?
    Attached Files Attached Files
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Valued Forum Contributor Rahul Nagar's Avatar
    Join Date
    09-18-2008
    Location
    nasik
    MS-Off Ver
    Excel 2003
    Posts
    465

    formula is too long

    Hello Ron Coderre

    Please check the attached file and help me in this.
    Thanks is advance

    Regards
    Rahul
    Attached Files Attached Files

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Lookup tables

    I attached an edited version of your workbook that demonstates the
    proper lookup table structure and formulas for the Configuration section.

    Lookup table:
    Config       Monthly     Quarterly   Semiannually  Annually
    2GB          10          30          50            100
    4gb          30          90          150           300
    8gb          Na          Na          Na            Na
    12gb         NA          NA          NA            NA
    16gb         NA          NA          NA            NA
    18GB         NA          NA          NA            NA
    Formula for
    E5: =VLOOKUP(B5,$F$1:$J$7,MATCH($B$3,$F$1:$J$1,0),0)
    You'll need to create similar tables and formulas for each of the other sections.

    I hope that helps.
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor Rahul Nagar's Avatar
    Join Date
    09-18-2008
    Location
    nasik
    MS-Off Ver
    Excel 2003
    Posts
    465
    Thank you very much

+ 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