![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Location: Georgia
Posts: 8
|
I cannot get this formula to work:
IF(G9="H""K""L""M""N""O""P",H8-E9,H8))) If G9 has any of those letters I want it to perform the h8-h9 formula. I have tried a bunch of stuff and I am even using the "excel 2002 formulas" book by Walkenbach. I don't get an error, it will only recognize if I have 1 letter in the arguement. I tried using brackets around the group of letters as well. [ This Message was edited by: Nsdqdu on 2002-05-04 17:17 ] [ This Message was edited by: Nsdqdu on 2002-05-04 17:18 ] |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
=IF(OR(G9={"H","K","L","M","N","O","P"}),H8-E9,H8) Alternatively: =H8-(ISNUMBER(MATCH(G9,{"H","K","L","M","N","O","P"},0)))*E9 Aladin |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
IF((OR(G9="H",G9="K",G9="L",G9="M",G9="N",G9="O",G9="P"),H8-E9,H8))
[ This Message was edited by: Nimrod on 2002-05-04 17:32 ] |
|
|
|
|
|
#5 |
|
New Member
Join Date: May 2002
Location: Georgia
Posts: 8
|
THANK YOU!!!!!!!! Aladin. I'm not the best at syntax, I was close but still far away. I misused the OR function. You just alieviated a lot of stress from my life.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|