English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am working on a spread sheet and cannot get an if fuction to relate to 3 different cells. I need it to say the name of 3 different companies. Ok if E5G5

2007-11-02 03:50:46 · 2 answers · asked by willieo80 1 in Science & Mathematics Mathematics

sorry it cut of the actual function. =IF(E5

2007-11-02 10:00:48 · update #1

IT STILL CUTS IT OFF! GRR

2007-11-02 10:01:36 · update #2

IF(G5

2007-11-02 10:05:48 · update #3

IF(I5

2007-11-02 10:06:12 · update #4

2 answers

You wrote:
if E5 if E5
What is the difference? It looks like the same.

---

My spreadsheet is Excel. Excel does not allow 3 different returns in one cell. I got the result in one of 3 different cels.

First I made these 3 functions in cells N5, O5 and P5 (white letters on white background):
=AND(E5 =AND(G5 =AND(I5
Then the result is in one of these 3 cells:
=IF(N5;"company1";" ")
=IF(O5;"company2";" ")
=IF(P5;"company3";" ")

(6 cells used altogether) Cannot send you the spreadsheet I do not know your address.

---

Hi GU: it seems fine if the spreadsheet can do it. My Excel can not; it has the CHOOSE function, but cannot do compound IF function (cell Q5).

I find also another way how to show the result in one cell: by help of formula =CONCATENATE(K5;L5;M5)

-

2007-11-02 07:52:10 · answer #1 · answered by oregfiu 7 · 0 0

First, like Oregfiu pointed out, your last conditional for company3 is the same as that for company1 so that may be why you never get "company 3" as a result. I also like his approach for setting up individual cells to hold the results of the conditional testing. You CAN get Excel to use a single cell to hold the desired result though. Here's how (I'm assuming one and only one of the compound conditions can be true)

Following Oregiu's pattern, place the following formula in cell Q5:
=if(N5,1,0) + if(O5,2,0) + if(P5,3,0)
As a result, Q5 will have a value of 1,2, or 3, depending on which of the compound conditionals is true. You can then use the choose function to give your desired result, let's say in cell R5:
=choose(q5,"company 1", "company 2", "company 3")

2007-11-06 20:05:59 · answer #2 · answered by GU 2 · 0 0

fedest.com, questions and answers