View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sheeloo[_3_] Sheeloo[_3_] is offline
external usenet poster
 
Posts: 1,805
Default Multiple Nested Function

Hello Russ,

The detailed description provided by you was excellent...
Look for my answers below in the rows without an ""

(Assuming you are working on Row 2)
Enter this in U2
=MATCH("*"&LEFT(R2,2)&"*",C2:C33,0)

Formula Conditions:
If the left 2 characters of RCCC Code (Column R) match anything in Column C,
Rows 2-33 then continue, if not, then match is FALSE.

Enter this in V2
=ISNA(MATCH("*"&LEFT(R2,2)&"*",C2:C33,0))

If 3rd & 4th characters of RCCC Code (Column R) match the first two
characters in Column D, then continue, if not, then match is FALSE.

Enter this in W2
=ISNA(MATCH(MID(R2,3,2))&"*",D2:D33,0))
If you just want to look in D2 then replace D2:D33 with D2

If PEC Code (Column S) matches PEC Code (either Column F or G) then
continue, if not, then match is FALSE.

Enter this in X2
=OR(ISNA(MATCH(S2,F2:F33,0)),ISNA(MATCH(S2,G2:G33, 0)))

If BAG Code (Column T) matches BAG Code (Column H) then continue, if not,
then match is FALSE.

Enter this in Y2
=ISNA(MATCH(T2,H2:H33,0))

Last Step
Then put this in the Cell E2
=IF(SUMPRODUCT(--(V2:Y2))=4,INDIRECT(U2),"Not GWOT related")
Copy these formulae down to the end of your dataset

Hope I have not made a mistake in copying the formula here... I hope you got
the idea...
You can always combine all these formulae into one cell

Let me know how it goes

--
Always provide your feedback...


"Russ" wrote:

I'm attempting to assign contract descriptions based on multiple elements of
the contracts. All data is in the same worksheet / same tab. I could use
some help developing a series of nested functions that compare data and pull
the correct description. Here's what I've got to work with:

Formula Objective:
Search the combination of Contract RCCC, PEC, and BAG codes and select the
applicable description if all elements are TRUE. If any of the elements are
FALSE, enter €śNot GWOT related€ť.

Formula Conditions:
If the left 2 characters of RCCC Code (Column R) match anything in Column C,
Rows 2-33 then continue, if not, then match is FALSE.
If 3rd & 4th characters of RCCC Code (Column R) match the first two
characters in Column D, then continue, if not, then match is FALSE.
If PEC Code (Column S) matches PEC Code (either Column F or G) then
continue, if not, then match is FALSE.
If BAG Code (Column T) matches BAG Code (Column H) then continue, if not,
then match is FALSE.

Contract Codes:
RCCC Code Column R; Rows 2-4804, inclusive
PEC Code Column S; Rows 2-4804, inclusive
BAG Code Column T; Rows 2-4804, inclusive

Criteria:
6 Digit RCCC Code Column A; Rows 2-33, inclusive
RCCC Digits 1 & 2 Column C; Rows 2-33, inclusive
RCCC Digits 3 to 6 Column D; Rows 2-33, inclusive
PEC Column F or Column G; Rows 2-33, inclusive
BAG Column H; Rows 2-33, inclusive

Desired Description Column E; Rows 2-33, inclusive