Question about an Excel formula.

Xarpolis

Life's a Dream
14,106
15,613
Ok, I have a question about making a formula in Excel.

I'm trying to write a formula that will make my life easier. I want it to look at cell C11 and see if it's 0-3. If so, type White. If 4-15 type Green, if 16-63 type Blue, if 64-255 type Purple if 256-1023 type Orange if 1024 and over type Yellow.

Any idea how I would make it do that? Thanks in advance!
 

Chancellor Alkorin

Part-Time Sith
<Granularity Engineer>
6,029
5,915
You didn't account for less than 0, so I left the cell blank in that case:

=IF(C11<0,"",IF(AND(C11>=0,C11<=3),"White",IF(AND( C11>=4,C11<=15),"Green",IF(AND(C11>=16,C11<=63),"B lue",IF(AND(C11>=64,C11<=255),"Purple",IF(AND(C11> =256,C11<=1023),"Orange","Yellow":emoji_nose::emoji_nose:

I'm sure there's a more elegant way to do it, but this one works.
 

Xarpolis

Life's a Dream
14,106
15,613
Thanks, but it doesn't appear to work. Oh well, back to the drawing board. As of right now it's just a box that says the entire formula.

Does it matter if C11 is a formula in and of itself, adding up a few previous columns?
Oh, I'm using Excel 2007.
 

k^M

Blackwing Lair Raider
2,698
1,960
Thanks, but it doesn't appear to work. Oh well, back to the drawing board. As of right now it's just a box that says the entire formula.

Does it matter if C11 is a formula in and of itself, adding up a few previous columns?
Oh, I'm using Excel 2007.
Not sure if it does in 2007 but in 2010/2013 it shouldnt, no. It'll just take whatever that cell totals up to and bases it off that.

The formula Alkorin posted should work I think there may just be an extra spaces in it, apart from that the logic looks good
 
34
0
Thanks, but it doesn't appear to work. Oh well, back to the drawing board. As of right now it's just a box that says the entire formula.

Does it matter if C11 is a formula in and of itself, adding up a few previous columns?
Oh, I'm using Excel 2007.
Sounds like excel decided it knows better than you and the cell is formatted as text. Try changing it to General and see if it works.

*edit* To clarify, the formula provided, not C11
 

ToeMissile

Pronouns: zie/zhem/zer
<Gold Donor>
2,704
1,651
After you change it to general, click in the formula bar and then hit enter. Otherwise it won't update all the way or something.
 

Chancellor Alkorin

Part-Time Sith
<Granularity Engineer>
6,029
5,915
Yep, it works fine, I tried it before I posted. Sounds like a cell formatting issue.