Archive

Excel Formula Help

  • ernest_t_bass
    I can't figure this out. Formula goes in A1. I want A1 to display "x" if a term shows up in a certain field, one of four fields. I can get one field, but can't get the other 3. Here is what I have:

    =if(b1="Psychology","x","")

    How do I write that formula to include c1, d1, and e1 = "Psychology"?
  • derek bomar
    nested Ifs...
  • derek bomar
    so where your first formulas goes "x","", make it say "x",if(... and then start over with the next cell you're trying to look at. You can only have i believe 7 nested Ifs
  • Laley23
    Nested If. Dont use the "" as the second option. Start another If statement. The final one will be "".
  • Laley23
    derek bomar;1258645 wrote:so where your first formulas goes "x","", make it say "x",if(... and then start over with the next cell you're trying to look at. You can only have i believe 7 nested Ifs
    I think thats old. I have a formula for my timesheets/work and I have about 20 Ifs for calculating my money earned.

    Also made a player pickem and had about a 45 nested If formula. Then again, I dont use excel, I use Google Docs...so that might be a reason.
  • ernest_t_bass
    derek bomar;1258645 wrote:so where your first formulas goes "x","", make it say "x",if(... and then start over with the next cell you're trying to look at. You can only have i believe 7 nested Ifs
    I only need 4. So you're saying:

    =if(b1="Psychology","x",if(c1="Psychology","x",if(d1="Psychology","x",if(e1="Psychology","x","")
  • derek bomar
    Laley23;1258652 wrote:I think thats old. I have a formula for my timesheets/work and I have about 20 Ifs for calculating my money earned.

    Also made a player pickem and had about a 45 nested If formula. Then again, I dont use excel, I use Google Docs...so that might be a reason.
    might be - i just recently upgraded to the new office so I could be wrong. I know it was like that in 2003.
  • derek bomar
    ernest_t_bass;1258653 wrote:I only need 4. So you're saying:

    =if(b1="Psychology","x",if(c1="Psychology","x",if(d1="Psychology","x",if(e1="Psychology","x","")
    yes - you'll have to add a few )))) at the end of it though
  • FatHobbit
    in that case, can you not do if (b1="psychology" or c1="Psychology" or d1="psychology" or e1="psychology","x","")
  • derek bomar
    FatHobbit;1258659 wrote:in that case, can you not do if (b1="psychology" or c1="Psychology" or d1="psychology" or e1="psychology","x","")
    you could do that as well
  • ernest_t_bass
    derek bomar;1258658 wrote:yes - you'll have to add a few )))) at the end of it though
    Right. Thanks.
  • gut
    Not sure exactly what you are doing, but sometimes it's easier just to create a vlookup table for something like this.
  • Laley23
    FatHobbit;1258659 wrote:in that case, can you not do if (b1="psychology" or c1="Psychology" or d1="psychology" or e1="psychology","x","")
    That does work also. I like If statements, cause I think they are easier to change 1 part of it and not have the re-write the whole formula. Just the IF that you need to change.
  • O-Trap
    derek bomar;1258656 wrote:might be - i just recently upgraded to the new office so I could be wrong. I know it was like that in 2003.
    Yeah, I just did one with 12 nested ifs in 2010. Seems to be working okay so far.
  • gut
    O-Trap;1258684 wrote:Yeah, I just did one with 12 nested ifs in 2010. Seems to be working okay so far.
    Hahahaha, the bane of programmers.

    One way to guarantee no one (including yourself) can understand what the spreadsheet is doing is to have like 4 cells in a row passing a result based on a 12-step nested if.
  • O-Trap
    gut;1258698 wrote:Hahahaha, the bane of programmers.

    One way to guarantee no one (including yourself) can understand what the spreadsheet is doing is to have like 4 cells in a row passing a result based on a 12-step nested if.
    Eh, it's all stat tracking from what the data programmers already spit out, so they don't have to deal with it. It's for my own reports.
  • gorocks99
    If you just need to know if one of the cells has "psychology", why not an "or"?

    =if(or(b1="psychology",c1="psychology",etc.),x,"")

    oops. looks like fathobbit already suggested that.
  • FatHobbit
    gorocks99;1258727 wrote:If you just need to know if one of the cells has "psychology", why not an "or"?

    =if(or(b1="psychology",c1="psychology",etc.),x,"")

    oops. looks like fathobbit already suggested that.
    I might have screwed up the syntax.