+ Reply to Thread
Results 1 to 28 of 28

Conditional Formula Requested

Hybrid View

  1. #1
    Registered User
    Join Date
    12-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Conditional Formula Requested

    Book2.xlsx

    Hey all,

    So i've tried a few different rules and can't seem to find a way to get the desired result, so i'll lay it out here as simple as I can to try to get the best answer/result possible.


    I want a formula that I can enter a main item, and up to 4 sub items and it will tel me how to get those 4 sub items to be with the main item.

    Example:

    5 Main Items
    20 Sub items
    10 Conditions

    Not all Main Items can just be combined with each sub item, but some main items can have certain sub items when certain conditions are met:

    Main item 1 cannot have sub item 5 directly by itself, but Main item 2 can. So I need to find a way to get sub item 5 from main item 2 to main item 1.

    In this particular case;
    Main item 1 has condition 2 and 3 and is able to have sub item 1,2,3,4 directly, and all sub items indirectly
    Main item 2 has condition 4 and 5 and is able to have sub item 5,6,7,8 directly, and all sub items indirectly
    Main item 3 has condition 4 and 7 and is able to have sub item 9,10,11,12 directly, and all sub items indirectly
    Main item 4 has condition 7 and 2 and is able to have sub item 13,14,15,16 directly, and all sub items indirectly
    Main item 5 has condition 9 and 10 and is able to have sub item 17,18,19,20 directly, and all sub items indirectly


    So with this in place it would appear I can use Main Item 2 with condition 4 to attach sub item 5 to main item 3, then use main item 3 with condition 7 to attach sub item 5 to main item 4, then with main item 4 using condition 2 i can atatch sub item 5 to main item 1.

    Therefore receiving my desired result of Main Item 1 with Sub item 5.

    Now, what i want is a formula that can work all of this out by displaying this info on hidden sheets and just having a few selection boxes on the main sheet to select the desired main item with the desired sub items and then display the required chain that is needed.

    Now once i have that (if its possible), i'd like to goa little deeper and sub conditions, so Main Item 2 can directly have sub item 5, but only when Sub condition 50 is met. Now, sub condition 50 can always be met, but i just want it to display that int eh final tree:

    Ie: Main Item 1 with Sub item 5 = Main Item 2 SC50 > Main Item 3 > Main Item 4 > Main Item 5

    i'd also like it to display up to 4 possible sub items, if that many are chosen. So you may Select Main Item 1 with either 1,2,3 or 4 sub items attached.


    Have been playing around with VLOOKUP and data ranges etc but I just can't figure out how to add in the conditions

    The finished product will have hundreds of each main item, sub item, conditions etc.


    Thanks all, I hope i've been clear enough.



    EDIT: Also, if the Main Item cannot have a requested Sub Item, then to display a Not Available message or something similar.
    Last edited by Napalm13; 12-27-2013 at 09:08 AM.

  2. #2
    Forum Contributor rajeshturaha's Avatar
    Join Date
    08-22-2012
    Location
    Assam, India
    MS-Off Ver
    Excel 2003, 2007
    Posts
    236

    Re: Conditional Formula Requested

    Hi Napalm
    Welcome to the forum.
    I tried but could not figure out what is your requirement.
    Could you plz give any examples without formula, for your desired results in the excel file.
    Rgd
    RT
    If my answer(s) helped you, please add me reputation by click on *

  3. #3
    Registered User
    Join Date
    12-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Conditional Formula Requested

    Greetings and thanks

    I'm not sure exactly what you're asking as i've given as many examples as I can.

    The desired result is it tells me the path i need to take to get the desired result

    ie:Main Item 1 with Sub item 5 = Main Item 2 SC50 > Main Item 3 > Main Item 4 > Main Item 5

    I'll be around for a few mroe hours so happy to sit here and give as much info as you need, thanks again

  4. #4
    Forum Contributor rajeshturaha's Avatar
    Join Date
    08-22-2012
    Location
    Assam, India
    MS-Off Ver
    Excel 2003, 2007
    Posts
    236

    Re: Conditional Formula Requested

    In this particular case;
    Main item 1 has condition 2 and 3 and is able to have sub item 1,2,3,4 directly, and all sub items indirectly
    Main item 2 has condition 4 and 5 and is able to have sub item 5,6,7,8 directly, and all sub items indirectly
    Main item 3 has condition 4 and 7 and is able to have sub item 9,10,11,12 directly, and all sub items indirectly
    Main item 4 has condition 7 and 2 and is able to have sub item 13,14,15,16 directly, and all sub items indirectly
    Main item 5 has condition 9 and 10 and is able to have sub item 17,18,19,20 directly, and all sub items indirectly

    How would you evalute the above manually, what is your logic behind

  5. #5
    Registered User
    Join Date
    12-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Conditional Formula Requested

    i submitted an example doc in the OP

    basically it would have lists setup for "conditions" "sub item" "main item" etc and would query those lists for a result


    i guess in plain terms im after: =lookup dropdownbox[for main item] then go to requested sub items to find out what you want to achieve, then go to that main item in conditions sheet, find its conditions [can either have 1 or 2 conditions], then seek out another main item that can have the same sub item with either of those conditions as direct, if non can have it as direct with those conditions, then find a main item with either of those conditions that can have it as indirect, then see if any main items with similar conditions to the new main item can have it as direct, if not then go tot he next one that can have it as indirect with a similar condition tot eh last main item. keep doing this until u find one that can have it as direct [which is the starting point] then report all necessary steps required to achieved your desired result from the found starting point


    i can do this with html, but i have no idea if i can do it with excel. i just want it in excel so i can distribute it without having to host a site or make a flash file

  6. #6
    Forum Contributor rajeshturaha's Avatar
    Join Date
    08-22-2012
    Location
    Assam, India
    MS-Off Ver
    Excel 2003, 2007
    Posts
    236

    Re: Conditional Formula Requested

    On more example will be helpful.
    How would you get Main Item 2 to sub item 15 directly

  7. #7
    Registered User
    Join Date
    12-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Conditional Formula Requested

    in the example i gave you can't, only main item 4 can access sub item 15 directly. to get main item 2 paired with sub item 15 you would need to start with main item 4, then use its condition 7 to pair sub item 5 to main item 3, then use main item 3s condition 4 to pair sub item 5 with main item 2

    i guess another way to look as it is data or video transfer.

    but all the conditions are different forms of cord/cable and the main items are different hardware with different connection ports, so you cant plug a hdmi into dvi, but if you have dvi u can link the 2 and still achieve the same result (basically)

  8. #8
    Registered User
    Join Date
    12-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Conditional Formula Requested

    I guess some more simple examples would be transferring sub item 15 to main item 1.

    Main item 1 can't directly have it, but indirectly it can receive it from main item 4 through condition 2

    so a formula would go something like =lookup ([query what main item is-ok so its main item 1], lookup([query what conditions it has, ok so it has 2 and 3], lookup ([query what subitem u want attached, ok so its 15], lookup([query sub item 15 table and see what main items attach to it, so one directly which is main item 4], lookup ([do they share any conditions? yes, condition 2, great!], report in text (the main item, which is 4, the condition which is 2),if nothing was found that could possibly link the 2 post not available))))))))) etc.....

    something along those sort of lines....



    Main item 1 has condition 2 and 3 and is able to have sub item 1,2,3,4 directly, and all sub items indirectly
    Main item 4 has condition 7 and 2 and is able to have sub item 13,14,15,16 directly, and all sub items indirectly

  9. #9
    Forum Contributor rajeshturaha's Avatar
    Join Date
    08-22-2012
    Location
    Assam, India
    MS-Off Ver
    Excel 2003, 2007
    Posts
    236

    Re: Conditional Formula Requested

    Ok i m trying, it may take some time

  10. #10
    Registered User
    Join Date
    12-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Conditional Formula Requested

    thanks mate, much appreciated.

  11. #11
    Registered User
    Join Date
    12-27-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Conditional Formula Requested

    Hi Napalm,

    Welcome to excel forum.
    I can't understand what you want??? Will you please explain your need in simple way?

  12. #12
    Registered User
    Join Date
    12-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Conditional Formula Requested

    Quote Originally Posted by amit4blog View Post
    Hi Napalm,

    Welcome to excel forum.
    I can't understand what you want??? Will you please explain your need in simple way?
    Quote Originally Posted by Napalm13 View Post
    i submitted an example doc in the OP

    basically it would have lists setup for "conditions" "sub item" "main item" etc and would query those lists for a result


    i guess in plain terms im after: =lookup dropdownbox[for main item] then go to requested sub items to find out what you want to achieve, then go to that main item in conditions sheet, find its conditions [can either have 1 or 2 conditions], then seek out another main item that can have the same sub item with either of those conditions as direct, if non can have it as direct with those conditions, then find a main item with either of those conditions that can have it as indirect, then see if any main items with similar conditions to the new main item can have it as direct, if not then go tot he next one that can have it as indirect with a similar condition tot eh last main item. keep doing this until u find one that can have it as direct [which is the starting point] then report all necessary steps required to achieved your desired result from the found starting point


    i can do this with html, but i have no idea if i can do it with excel. i just want it in excel so i can distribute it without having to host a site or make a flash file
    this is about as simple as i can explain it sorry. i don't know how else to say it sorry

  13. #13
    Registered User
    Join Date
    12-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Conditional Formula Requested

    Here is an example of a website with similar sort of setup i'm trying to achieve, not exactly, but similar.
    http://waitingforseedot.appspot.com/
    it has a main item selection, and 4 sub items, and i guess each one has conditions of some sort to find out what is compatible

  14. #14
    Forum Contributor rajeshturaha's Avatar
    Join Date
    08-22-2012
    Location
    Assam, India
    MS-Off Ver
    Excel 2003, 2007
    Posts
    236

    Re: Conditional Formula Requested

    Plz see the attachment File
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    12-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Conditional Formula Requested

    Conditional Formula.xlsx

    Hey mate,


    Thanks again for putting in your time her,e it's very much appreciated.


    Now i've got a couple of issues here. For starters, it doesn't seem to be following the conditions much. it is showing impossible paths and also not showing shortest possible paths. (maybe thats my fault for not asking for that)

    I've uploaded a modified version of your worksheet with the new layout and changed the named lists to suit but have not touched any formulas.

    Basically i want to to show shortest possible path (to help save on materials and time), as well as to not display impossible paths that could not happen due to incompatible conditions.

    Examples: When i select Main item 1 and sub item 6, it shows the path MI 2 > MI 3 > MI 4 > MI 1, when that is not the shortest path, you can skip MI 4 in this instance.
    Example 2: In the new worksheet, main item 5 cannot have sub items 5-8 ever. But when i select main item 5 and choose sub item 6, it shows a path, which isn't possible as its not displayed in the last sheets sub item 6 list. Yes the conditions can be met as su item 6 is directly linked to main item 2 which can in turn link to main item 5, but sub item 6 cannot be attached to main item 5 so it should not display as possible for sub item 6.

    To help clarify it all a little bit, this spreadsheet will be for robotics parts(main items) that have many optinal parts(sub items) but most have different connectors(conditions) for the purposes of problem solving.

    I'll be around for a few hours, so feel free to ask me to clarify anything,

    Again, thanks so much for your time.

  16. #16
    Forum Contributor rajeshturaha's Avatar
    Join Date
    08-22-2012
    Location
    Assam, India
    MS-Off Ver
    Excel 2003, 2007
    Posts
    236

    Re: Conditional Formula Requested

    Plz check the attachment, if it is OK
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    12-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Conditional Formula Requested

    awesome! thats great. my only concern is with the red box on sheet 2, what is its purpose? if all that info already exists on the sub items tab why is it there?
    this doc will have hundreds and hundreds of sub items, so that box wont be able to stay there like that

    is there a way whatever is reading from it to just make it red from the sub item sheet instead?

  18. #18
    Forum Contributor rajeshturaha's Avatar
    Join Date
    08-22-2012
    Location
    Assam, India
    MS-Off Ver
    Excel 2003, 2007
    Posts
    236

    Re: Conditional Formula Requested

    Great i could help you.
    On sheet 2 , i have created a matrix for all your condition, sub item in relation to the main item. In order you want to remove the box and read it from the sub item tab all the formulas have to be rewritten. The formula here is working in the given conditions as mentioned by you.

  19. #19
    Registered User
    Join Date
    12-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Conditional Formula Requested

    Ok great, yeh i can work with that, i can adjust it to suit my needs.

    I'm having an issue i cannot seem to fix.

    Please view this version, no formulas have been changed or anything, all i have done is change the conditions around for the main items. Now that works for all of them except main item 5.
    Conditional Formula2.xlsx


    For some reason, now that main item 5's conditions are 9 and 10 and i have changed other main items conditions to be able to link to it they wont. Now the other main items still functions with their new conditions, but for some reason whenever i select sub item 1-4 or 9-12 for main items 5, it will not link, even though it is a possible link.

    If i select sub item 9 for main item 5, it should display Main item 3 > Main Item 4 > Main Item 5. but it says it can't be achieved.

    Same thing happens for sub items 1-4. Any of those should display Main Item 1 > Main Item 3 > Main Item 4 > Main Item 5. but again, it won't.



    Edit:

    Also, there is no way to read sub conditions at this point, so i'm goign to have to re write teh formulas, but i should be ok with that. They are a must as in the end result not everything will be able to have all sub items, but it may be able to have it as a conditional sub item. Ie: cannot be attached directly, but when coupled with an extra connector(sub condition) it can be.


    Example:
    Main item 25 link to 26, links to 27.
    Sub Item 5 is a direct link on 25, but not 26. But it can be with sub condition 5.

    So then it would display the same result: Main Item 25 > Main Item 26 > Main item 27 but the formula would have to be different to make it read from the sub conditions sheet as well.

    I'll have a go at it and if i need help i'll come ask
    Last edited by Napalm13; 12-30-2013 at 06:33 AM.

  20. #20
    Forum Contributor rajeshturaha's Avatar
    Join Date
    08-22-2012
    Location
    Assam, India
    MS-Off Ver
    Excel 2003, 2007
    Posts
    236

    Re: Conditional Formula Requested

    What condition are you given in Main item 5

  21. #21
    Registered User
    Join Date
    12-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Conditional Formula Requested

    Quote Originally Posted by rajeshturaha View Post
    What condition are you given in Main item 5
    sorry i realised i didn't upload it, its up now

  22. #22
    Forum Contributor rajeshturaha's Avatar
    Join Date
    08-22-2012
    Location
    Assam, India
    MS-Off Ver
    Excel 2003, 2007
    Posts
    236

    Re: Conditional Formula Requested

    Great.................

  23. #23
    Registered User
    Join Date
    12-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Conditional Formula Requested

    i can see that if i select sub item 9, it goes through the process correctly when viewing it in the Working sheet. it says [Main Item 3] [ 4 ] [ 7 ] [ Main Item 2] it shouldnt be going to main item 2, it should be going down to Main Item 4, for some reason its going back up to 2 and then ending.

  24. #24
    Forum Contributor rajeshturaha's Avatar
    Join Date
    08-22-2012
    Location
    Assam, India
    MS-Off Ver
    Excel 2003, 2007
    Posts
    236

    Re: Conditional Formula Requested

    Ok i will see to that during my Off time

  25. #25
    Registered User
    Join Date
    12-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Conditional Formula Requested

    thanks again, much appreciated.

  26. #26
    Forum Contributor rajeshturaha's Avatar
    Join Date
    08-22-2012
    Location
    Assam, India
    MS-Off Ver
    Excel 2003, 2007
    Posts
    236

    Re: Conditional Formula Requested

    Plz check , i have some correction in the attachment
    Attached Files Attached Files

  27. #27
    Registered User
    Join Date
    12-27-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Conditional Formula Requested

    Quote Originally Posted by rajeshturaha View Post
    Plz check , i have some correction in the attachment
    that seems to be working now. the onyl thing is when i select a direct link, ie: Main items 5 with sub item 20, it shows #NUM instead of just Main Item 5

  28. #28
    Forum Contributor rajeshturaha's Avatar
    Join Date
    08-22-2012
    Location
    Assam, India
    MS-Off Ver
    Excel 2003, 2007
    Posts
    236

    Re: Conditional Formula Requested

    Just add iferror() in I col of "working" sheet

+ 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. Replies: 3
    Last Post: 10-01-2013, 02:35 PM
  2. If statement formula for range not changing requested cell to yes
    By Exceldope in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-20-2012, 12:14 PM
  3. [SOLVED] Assistance Requested with Sum If Formula using Multiple Criteria
    By mick86 in forum Excel General
    Replies: 5
    Last Post: 09-16-2012, 09:04 AM
  4. Date formula help requested pls.
    By markmash in forum Excel General
    Replies: 4
    Last Post: 04-04-2009, 08:01 PM
  5. [SOLVED] Help Requested on Formula
    By Rich Rosier in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-02-2006, 04:10 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