![]() |
![]() |
|
|||||||
| 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 |
|
Board Regular
Join Date: Mar 2002
Posts: 134
|
Hi, My question is how do I display the text Invalid code if a number is more than 49 or less than 30 in this formula =INDEX(Countries,20,1)
[ This Message was edited by: Charlie on 2002-03-04 04:08 ] |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Brampton
Posts: 324
|
What about this formula:
=IF(OR(INDEX(Countries,20,1)>49,INDEX(Countries,20,1)<30),"INVALID CODE",INDEX(Countries,20,1)) [ This Message was edited by: Corni on 2002-03-04 19:06 ] |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 134
|
Firstly thanks for answering, the formula looks good, the only trouble is when its copied down the whole row reads Invalid Code, so I think I must have made a mistake somewhere, perhaps I should have made a cell reference absolute.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|