Results 1 to 2 of 2

Too many IF statements?

Threaded View

mdovey Too many IF statements? 02-23-2014, 04:16 PM
arlu1201 Re: Too many IF statements? 03-06-2014, 09:46 AM
  1. #1
    Registered User
    Join Date
    10-09-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    78

    Too many IF statements?

    I currently have a drop down menu on my spreadsheet which allows the user to select from a range of computer parts such as "MotherBoard", "CPU" ect... Depending on what was selected in the drop down list the headings in my table change to suit the computer part selected. So if motherboard is selected all of the data about the motherboard appears in the table and the headings change to that of a motherboard e.g. "Supported Memory", "Sound Card" .... To do this i have had to use this code so that the heading do change to suit the part selected in the drop down list.

    =IF($A$1="Motherboard",Stock!G1,IF($A$1="CPU",Stock!AC1,IF($A$1="GPU",Stock!S1,0)))
    Cell A1 is where the drop down list is located on my table. Stock! is refering to my stock sheet which has all of the heading for each part and the data that come with it. I will include a copy of my prototype so that helping me will be made easier.

    Stock Table Prototype.xlsx

    This code was made to work with only 3 computer parts as a prototype so i could make sure it worked. I will have over 10 computer parts available to be selected from the drop down list when i create the actual stock table. This would mean i would need over 10 IF statements for it to work. I was wondering if there is a way of shorting on even changing the code if possible so that i wouldn't have to keep on writing IF statements in order for it to work. Thank you for any solutions and input.
    Last edited by mdovey; 03-02-2014 at 11:21 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Reading If statements and formulating values from if statements
    By crnam in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-16-2013, 05:20 AM
  2. Multiple nested IF statements and AND statements
    By TonyGetz in forum Excel General
    Replies: 2
    Last Post: 12-14-2010, 03:07 AM
  3. Nested If statements / logic statements
    By Brainless_09 in forum Excel General
    Replies: 3
    Last Post: 06-17-2009, 02:59 PM
  4. Replies: 12
    Last Post: 05-15-2009, 08:38 AM
  5. [SOLVED] operator statements, shorting when reusing one of the statements?
    By KR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2005, 02:05 PM

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