This is what Earl was talking about.
Read this and incorporate it into your formula and see what happens.
You can make a table of all your choices and values, and then have your
formula lookup the choice and then apply the corresponding value.
COL A COL B
1 YES,DT 0.8
2 NO,DT 1.25
3 YES,DD 0.8
4 NO,DD 1.5
5 YES,CS 0.8
6 NO,CS 1.1
7 YES,FB 0.8
8 NO,FB 1.1
9 MOTION 0.9
Say the choices are in ColumnA and the values are in ColumnB, starting in
Row1.
So your list can be described as A1:B9
OR, you can give it a name as Earl did and call it "Table".
I prefer addresses, so it can be understood at a later time.
Now your formula will "lookup" the choice in F1021:
=Vlookup(F1021,
From this rangeA1:B9
=Vlookup(F1021,A1:B9,
And, if it finds a match, return the value in the same row, *second* column
of the list,
=Vlookup(F1021,A1:B9,2
And you tell the formula that you want an exact match by using zero
=Vlookup(F1021,A1:B9,2,0)
Now that you have found the value, you multiply it by the contents of the
pre-determined cell E516
=Vlookup(F1021,A1:B9,2,0)*E516
You can now correct your references so that F1021 doesn't change when you
copy it down:
=Vlookup($F$1021,A1:B9,2,0)*E516
BUT, you also don't want the addresses of your list to change as you copy,
so change that also:
=Vlookup($F$1021,$A$1:$B$9,2,0)*E516
I don't know what you wish to happen to E516.
You can make it either relative, as it is now, without the dollar signs,
which means it will change with copying, OR make it absolute as was done
with the others, by adding the dollar signs.
If no choice is matched to the list, you will see an error returned #N/A.
With your new knowledge, eliminate those Indirects to make it shorter yet.
HTH,
RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================
RagDyer said:
Talk about sneaking up on a guy with a sucker punch !!!
Earl's suggestion of using a lookup formula will help make this whole thing
a lot shorter.
jayhawk1919 said:
Thanks so much for all your help.
Now what I want to do with that is stick it in to this equation:
=IF(INDIRECT("G"&INDIRECT("D"&"1021"))="Superstar",IF(OR($F$1021={"Yes,
DT","Yes, DD","Yes, CS","Yes, FB"}),E516*0.8,IF(OR($F$1021
={"No, CS","No, FB"}),E516*1.1,IF($F$1021="No,
DT",E516*1.25,IF($F$1021="No,
DD",E516*1.5,IF($F$1021="Motion",E516*0.9,"Blah"))))),IF(INDIRECT("G"&INDIRE
CT("D"&"1021"))="Big
Man",IF(OR($F$1021={"Yes, DT","Yes, DD","Yes, CS","Yes,
FB"}),F516*0.8,IF(OR($F$1021
={"No, CS","No, FB"}),F516*1.1,IF($F$1021="No,
DT",F516*1.25,IF($F$1021="No,
DD",F516*1.5,IF($F$1021="Motion",F516*0.9,"Blah"))))),IF(INDIRECT("G"&INDIRE
CT("D"&"1021"))="Shootout",IF(OR($F$1021={"Yes,
DT","Yes, DD","Yes, CS","Yes, FB"}),G516*0.8,IF(OR($F$1021
={"No, CS","No, FB"}),G516*1.1,IF($F$1021="No,
DT",G516*1.25,IF($F$1021="No,
DD",G516*1.5,IF($F$1021="Motion",G516*0.9,"Blah"))))),IF(INDIRECT("G"&INDIRE