View Single Post
  #3   Report Post  
Mazzaropi Mazzaropi is offline
Senior Member
 
Location: Belo Horizonte, Brazil
Posts: 170
Thumbs up

Quote:
Originally Posted by Iyanna View Post
I have three columns: Column A has a list of account numbers. Column B has a dollar amount. In column F, I have a list of accounts that I want to exclude. In Column C, I want to enter a formula that will look at the value in Column A, see if that account number is in Column F, and if it is NOT, then enter the amount in column B into column C. If the account number IS in Column F, then I want the cell in Column C to be blank. I cannot figure this out. It is something like IF(A2<$F$2:$F$21,B2,0) except you can't say "does not equal a range." I don't know the right way to say, "is not found in that range" in Excelspeak.

Can anyone help?
-------------------------------------------------------------------------

Dear Iyanna, Good Afternoon.

Your explanation was very well.

This a typical case to use the VLOOKUP FUNCTION.

Your Scenery:

___A____________B__________C__________D_E_F
1__Account Num__$ Amount___$ Amount 2_________Account to be Excluded
2_______1__________10______=FORMULA__________2
3_______2__________33______=FORMULA__________4
4_______3___________5______=FORMULA__________5
5_______4__________89______=FORMULA__________8
6_______5_________150______=FORMULA
7_______6__________16______=FORMULA
8_______7_________865______=FORMULA
9_______8__________67______=FORMULA
10______9__________44______=FORMULA


FORMULA:
C2 -- =IF(ISERROR(VLOOKUP(A2,$F$2:$F$10,1,FALSE)),B2,"DE LETE")

Copy it down untill C10


The results must be like these ones:

___A____________B__________C__________D_E_F
1__Account Num__$ Amount___$ Amount 2_________Account to be Excluded
2_______1__________10_________10_______________2
3_______2__________33________DELETE____________4
4_______3___________5__________5_______________5
5_______4__________89________DELETE____________8
6_______5_________150________DELETE
7_______6__________16_________16
8_______7_________865________DELETE
9_______8__________67_________67
10______9__________44_________44

You must adapt the contents of column C, eg. BLANK
You must adapt the interval of column F as your reality.
In this case the search works at F2:F10 but your necessity can be F2:F1450

Implement this one and tell me if it worked for you.

Fell free to ask anything about it.
__________________
I hope it can help you.

Best regards,
Marcilio Lobão
---------------------------
Belo Horizonte, Brazil