Re: Simple "If" Function - HELP
- From: James8309 <jaedong1221@xxxxxxxxx>
- Date: Tue, 17 Jun 2008 16:05:06 -0700 (PDT)
On Jun 18, 3:47 am, "GB" <NOTsome...@xxxxxxxxxxxxx> wrote:
"James8309" <jaedong1...@xxxxxxxxx> wrote in message
news:98914eb8-9963-4199-910e-4b2daf28b476@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi, Everyone
Let me first explain what I am trying to achieve very briefly.
1. If A1 = "E" and A2 >A3 and A3<A4 then return "ABC"
= > I know I can do this by using " if(and(A1="E",A2>A3,
A3>A4),"ABC",""))
However! However!!
2. if A1 = "E" stays same... except next criterias are different and
yes there are 95 of them. I just thought that it is painful to use
"And" function to hook up all the three criterias.
i.e. a) A1 = "E", A2<A3, A3=A4, then return "DEF" etc etc
b) A1 = "E", A2=A3, A4>A3 then return "XXX" etc etc etc etc x 95
times.
Is there any other way to lock that A1 = "E" ?? so I don't have to
type "And(A1 = "E", etc etc )" 95 times???
Should I be using VBA instead? Would that be easier?
Thank you for your help in advance!
Hmm, interesting. So, if I have understood you correctly, your cell will
contain 95 If statements all linked together with &s? You don't explain if
there is any logic in the way those ABCs and DEFs are generated. I can't
remember the maximum number of characters in a cell, but hopefully that
won't be a problem. However, actually generating the 95 If statements will
be (almost) impossible to do accurately by hand. I suggest that you create a
spreadsheet specifically to generate the formula you want to use.
An alternative is to use a scoring system, so A1 = A scores 1, through to
A1=Z scores 26. Also A2<A3 scores 100, A2= A3 scores 200, etc. (The scores
are done so that each combination is bound to give a unique value.) Then add
the 3 scores and use a lookup tables.- Hide quoted text -
- Show quoted text -
Firstly, Thanks for your help!
Basically,
1. I have Range A1 to A850 containing alphabets. They are almost
distributed.
i.e. A1 might be B, A2 might be Z ... etc
2. Column B, C, D and E contains numbers.
3. Each alphabet in Range("A1:A850") has different families.
i.e. A will have A110, A220, A33, A555 etc depending on relationship
between Column B,C,D and E
Example, lets say A group
A111 = B>C, C = D, D<E
A222 = B<C, C<>D, D>E
etc etc etc
if I was to code this conditions in column F it would be something
like this
"
if(and(A1="A",B>C,C=D,D<E),"A111",if(and(A1="A",B<C,C<>D,D>E),"A222",if
if if if if if etc etc etc
This is why I will end up with over 90 "if" & "And" statement in one
cell. I don't even know if it is possible. As you can see in every if
statement, there is condition A1="A". I just didn't know how to lock
it or make it common to all other statements.
Thanks again!
.
- Follow-Ups:
- Re: Simple "If" Function - HELP
- From: Pete_UK
- Re: Simple "If" Function - HELP
- References:
- Simple "If" Function - HELP
- From: James8309
- Re: Simple "If" Function - HELP
- From: GB
- Simple "If" Function - HELP
- Prev by Date: Re: batch conversion of URL text to hyperlink
- Next by Date: Re: Simple "If" Function - HELP
- Previous by thread: Re: Simple "If" Function - HELP
- Next by thread: Re: Simple "If" Function - HELP
- Index(es):
Relevant Pages
|