+ Reply to Thread
Results 1 to 8 of 8

Need Help Writing a Formula with Multiple IF/ OR Statements.

  1. #1
    Registered User
    Join Date
    11-03-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    9

    Question Need Help Writing a Formula with Multiple IF/ OR Statements.

    Hey everyone,

    I've been trying to create a table for work to help with conversions and calculations and i was wondering how i should approach this formula.

    I need to make a formula which will find the area and volume of a vertical or horizontal cylindrical AST and/or a rectangular AST dependent on which variables are present instead of having separate columns for the width diameter and circumference. (ex.) If the circumference of the cylinder is applied while the width and diameter are not present then calculate the volume of the cylinder using the circumference and length, or if the length is not present but the height is then to use the height instead of the length to do the calculation. It would also be helpful to find a formula to use in the same regard to find the area.

    Here is an example of what my table looks like,

    Attachment 275473

    If any of you could please assist me with this it would be greatly appreciated.

    Thanks guys,
    Attached Files Attached Files
    Last edited by palaceofreverie; 11-03-2013 at 11:44 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,972

    Re: Need Help Writing a Formula with Multiple IF/ OR Statements.

    Hi and welcome to the forum

    Please do not upload a picture of your file...rather, upload a sample of your workbook, showing what data you are working with, a few samples of your expected outcome is (manually entered is ok) and how you arrived at that. (exclude sensitive info). Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you Also, not all members can upload picture files (Company firewalls and stuff)

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    11-03-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    9

    Question Re: Need Help Writing a Formula with Multiple IF/ OR Statements.

    Alright thanks for your reply, sorry about the picture still one of my first posts

    Attached is the table in which I am working on.

    Once again, any help would be much appreciated.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,683

    Re: Need Help Writing a Formula with Multiple IF/ OR Statements.

    Data Range
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    18
    Berm A AST Calculations
    19
    AST #
    Lengh (ft.)
    Width (ft.)
    Height (ft.)
    Diameter (ft.)
    Circumference (ft.)
    Area formula
    Area
    Calc
    result
    vol
    formula
    Volumn
    calc
    result
    20
    AST #1
    0
    0
    2
    0
    12
    =IF(AND(C20:D20),C20*D20,IF(F20,PI() * F20^2/4,G20^2/4/PI()))
    11.4591559
    =I20*E20
    22.91831181
    21
    AST #2
    0
    3
    5
    0
    6
    =IF(AND(C21:D21),C21*D21,IF(F21,PI() * F21^2/4,G21^2/4/PI()))
    2.864788976
    =I21*E21
    14.32394488
    22
    AST #3
    8
    8
    1
    0
    0
    =IF(AND(C22:D22),C22*D22,IF(F22,PI() * F22^2/4,G22^2/4/PI()))
    64
    =I22*E22
    64
    23
    AST #4
    1
    2
    6
    0
    0
    =IF(AND(C23:D23),C23*D23,IF(F23,PI() * F23^2/4,G23^2/4/PI()))
    2
    =I23*E23
    12

    Warning: Avoid using merged cells!
    Last edited by protonLeah; 11-04-2013 at 02:47 AM.
    Ben Van Johnson

  5. #5
    Registered User
    Join Date
    11-03-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Need Help Writing a Formula with Multiple IF/ OR Statements.

    Quote Originally Posted by protonLeah View Post
    Data Range
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    18
    Berm A AST Calculations
    19
    AST #
    Lengh (ft.)
    Width (ft.)
    Height (ft.)
    Diameter (ft.)
    Circumference (ft.)
    Area formula
    Area
    Calc
    result
    vol
    formula
    Volumn
    calc
    result
    20
    AST #1
    0
    0
    2
    0
    12
    =IF(AND(C20:D20),C20*D20,IF(F20,PI() * F20^2/4,G20^2/4/PI()))
    11.4591559
    =I20*E20
    22.91831181
    21
    AST #2
    0
    3
    5
    0
    6
    =IF(AND(C21:D21),C21*D21,IF(F21,PI() * F21^2/4,G21^2/4/PI()))
    2.864788976
    =I21*E21
    14.32394488
    22
    AST #3
    8
    8
    1
    0
    0
    =IF(AND(C22:D22),C22*D22,IF(F22,PI() * F22^2/4,G22^2/4/PI()))
    64
    =I22*E22
    64
    23
    AST #4
    1
    2
    6
    0
    0
    =IF(AND(C23:D23),C23*D23,IF(F23,PI() * F23^2/4,G23^2/4/PI()))
    2
    =I23*E23
    12

    Warning: Avoid using merged cells!


    Thanks protonLeah,

    I've gotten rid of the merged cells and tried to re-write the formula this morning.

    The area worked fine when i applied this technique, while the end result for the area formula came out looking like this:

    =IF(AND(C16:D16),C16*D16,IF(F16,((F16/2)^2)*3.14,IF(G16,((((G16/3.14)/2)^2)*3.14))))

    But, when i tried to do the same thing for the volume i got an error saying there were to many arguments for this function.
    Here is how my formula reads:

    =IF(AND(C16:E16,(C16*D16*E16)*0.17811,if(G16,C16,((((((G16/3.14)/2)^2)*3.14)*C16)*0.17811),if(G16,E16,((((((G16/3.14)/2)^2)*3.14)*E16)*0.17811),if(F16,C16,(((((F16/2)^2)*3.14)*C16)*0.17811),if(F16,E16,(((((F16/2)^2)*3.14)*E16)*0.17811)

    not quite sure whats wrong.

    any advice as to what i should change/ add?
    Last edited by palaceofreverie; 11-04-2013 at 12:39 PM.

  6. #6
    Registered User
    Join Date
    11-03-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Need Help Writing a Formula with Multiple IF/ OR Statements.

    I've now tried to simplify the formula and still receive the same error.

    Here is how it reads currently:

    =IF(AND(C16:E16),C16*D16*E16*0.17811,if(C16,H16),H16*C160.17811,if(E16,H16),H16*E16*0.17811)

    Any ideas?

  7. #7
    Registered User
    Join Date
    11-03-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Need Help Writing a Formula with Multiple IF/ OR Statements.

    Never mind i found a simpler approach to it
    which reads:

    =IF(C16>0,(C16*H16*0.17811),IF(E16>0,(H16*E16*0.17811)))

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,972

    Re: Need Help Writing a Formula with Multiple IF/ OR Statements.

    Its always a great feeling when you solve stuff like this on your own, good job

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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] Syntax for formula that uses multiple conditions inside of multiple IF statements
    By njmiller31 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-02-2013, 11:55 AM
  2. Writing function with multiple (13) if/and/then statements
    By JOHNROK in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-03-2012, 10:03 AM
  3. Replies: 1
    Last Post: 04-06-2012, 04:14 AM
  4. Replies: 12
    Last Post: 05-15-2009, 08:38 AM
  5. Replies: 4
    Last Post: 07-28-2005, 07:05 PM

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