View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Glenn Glenn is offline
external usenet poster
 
Posts: 1,240
Default If then statement

Glenn wrote:
Anna McKenzie wrote:
I would like to set up an if then statement incorporating the language
below:

If AK11 is <= 243.9 then it is grade M01
If AK11 is =244 but less than 313 then M02
If AK11 is =313 but less than 382 then M03
If AK11 is =382 but less than 451 then M04
If AK11 is =451 but less than 520 then M05

Is this possible. Pls advise.

EggHeadCafe - Software Developer Portal of Choice XCeed Streaming
Compression Library
http://www.eggheadcafe.com/tutorials...compressi.aspx



=LOOKUP(AK11,{0,243.9,313,382,451,520},{"M01","M02 ","M03","M04","M05","Undefined"})

Actually, you will want either 243.9000000001 or 244 in place of 243.9 in the
formula above, depending upon the number of decimal places in your data.