Thread: Excel Formula
View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RagDyeR RagDyeR is offline
external usenet poster
 
Posts: 3,572
Default Excel Formula

For simplicity:

=LOOKUP(A1,{0,38,39,40,41;"Empty","One Quarter","Half","Three
Quarters","Full"})

--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
wrote in message
ps.com...
I wrote:
=if( A1<38, "empty", lookup(A1-38, {0,1,2,3}, {"quarter","half","three
quarters","full"}) )


Obviously that can be simplified. I started with one idea, ended up
with another, but failed to make simplifying adjustments. The above
can be written more simply and it is easier to understand as:

=if(A1<38, "empty", lookup(A1, {38,39,40,41}, {"quarter","half","three
quarters","full"}))

LOOKUP() matches the largest value less than or equal to A1.