1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Trying to properly use If with And, Or functions in excel

Discussion in 'Business Applications' started by ozmosis007, Sep 9, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. ozmosis007

    ozmosis007 Thread Starter

    Joined:
    Sep 9, 2011
    Messages:
    4
    Hi there,

    Im working on a naming data base. Its an excel spread sheet where I name pitches from baseball pitch fx data. Without going into details about my database, as what i do with it isnt important, I am trying to write an if statement that will give me the ability to ask if a pitch is located on the x axis between a certain point and is locted between 2 points on the y axis and is this speed/type than name it this. so example

    if "pitch A" is between 7 and 12 on the x axis and between 2 and 10 on the y and is a FF (4seam fastball) than return "Fastball" in cell C2 but if its not than return "-" Any help or insight would be great.
     
  2. etaf

    etaf Moderator

    Joined:
    Oct 2, 2003
    Messages:
    64,952
    First Name:
    Wayne
    SO see if this gets us close

    between 7 and 12
    AND(Xaxis>=7,Xaxis<=12)

    between 2 and 10
    AND(Yaxis>=2,Yaxis<=10)

    = "FF"

    IF ( AND(Xaxis>=7,Xaxis<=12), IF(AND(Yaxis>=2,Yaxis<=10), IF( x = "FF" , "Fastball", ""),""),"")

    you may even be able to

    AND(Xaxis>=7,Xaxis<=12, Yaxis>=2,Yaxis<=10, x = "FF")
    all in one test
    not sure on that
    =IF(AND(Xaxis>=7,Xaxis<=12, Yaxis>=2,Yaxis<=10, x = "FF"), "Fastball", "")

    do you have a dummy set of data you can upload with the details
     
  3. ozmosis007

    ozmosis007 Thread Starter

    Joined:
    Sep 9, 2011
    Messages:
    4
    Ive been working on this since my post and this is what i have

    My data points categorized


    Vertical Horizontal Running Fastball 7.00 12.00 -4.00 -12.00 4-seam Fastball 5.00 12.00 -2.00 -4.00 2-seam Fastball 3.00 7.00 -4.00 -12.00 Cut Fastball 3.00 12.00 -2.00 10.00 Splitter 5.00 -4.00 -2.00 -4.00 Sinker 3.00 -4.00 -4.00 -12.00
    My current string in excel (pitch types are the "or" functions Im looking for. First time posting so I apologize if my content is not what youre looking for.

    =IF(AND(V5>B2,W5<D2,AND(OR(X5="FA",X5="FF",X5="FT",X5="FC",X5="FS",X5="SI"))),A2,IF(AND(V5>B3,W5<D3,W5>E3,AND(OR(X5="FA",X5="FF",X5="FT",X5="FC",X5="FS",X5="SI"))),A3,IF(AND(V5>B4,V5<C4,W5<D4,AND(OR(X5="FA",X5="FF",X5="FT",X5="FC",X5="FS",X5="SI"))),A4,IF(AND(V5>B5,W5>D5,AND(OR(X5="FA",X5="FF",X5="FT",X5="FC",X5="FS",X5="SI"))),A5,IF(AND(V5<B6,V5>C6,W5<D6,W5>E6,AND(OR(X5="FA",X5="FF",X5="FT",X5="FC",X5="FS",X5="SI"))),A6,IF(AND(V5>B7,V5>C7,W5<D7,AND(OR(X5="FA",X5="FF",X5="FT",X5="FC",X5="FS",X5="SI"))),A7,IF(AND(V5<B9,V5>C9,W5<D9,OR(X5="SL",X5="CU",X5="KnC",X5="SLRV",X5="12-6",X5="SWC")),A9,"-")))))))
     
  4. etaf

    etaf Moderator

    Joined:
    Oct 2, 2003
    Messages:
    64,952
    First Name:
    Wayne
    no not helping me

    how is this presented in a spreadsheet cell

    can you show some dummy data in a spreadsheet and attach here - Remember this is a public forum so no copyright material or anything you do NOT want in a public domain
     
  5. ozmosis007

    ozmosis007 Thread Starter

    Joined:
    Sep 9, 2011
    Messages:
    4
    Not sure how to upload or what kind of dummy info youre looking for. All my info is stuff Ive created and isnt anything private. Sorry im not very helpful, but thank you for trying and taking interest
     
  6. etaf

    etaf Moderator

    Joined:
    Oct 2, 2003
    Messages:
    64,952
    First Name:
    Wayne
    ------------------------------------------------------------------------
    How to upload attachments

    goto a reply as normal
    just under the text box where you type a reply you will see two buttons
    click on the right hand button labelled " Go Advanced "

    then scroll down a little
    you will see a button
    "Manage Attachments"
    click on that button - another window opens

    click on " Choose File "
    locate the image to upload
    and then click on upload

    that should attach to the post

    Full details are here http://library.techguy.org/wiki/TSG_Posting_a_Screenshot
    ------------------------------------------------------------------------
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Trying properly functions
  1. MissHeck73
    Replies:
    0
    Views:
    188
  2. 4dsmom
    Replies:
    3
    Views:
    345
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1016810

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice