#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 343
Default Formula help

What I have are a series of Work Codes (shown Below). All work codes in the
10 range are paid at one rate all work codes in the 20 range at another. I
need write a formula which looks only at the first number of the work code
and if it is 1 return the value $18.50, if it is 2 then return the value
$21.36.

I know I can use an If statement to look at each number but this is just a
representative example. I actually have 6 different pay rates associated
with over 30 work codes.

10
11
12

20
21
22

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Formula help

See this:

http://contextures.com/xlFunctions02.html

--
Biff
Microsoft Excel MVP


"Patrick C. Simonds" wrote in message
...
What I have are a series of Work Codes (shown Below). All work codes in
the 10 range are paid at one rate all work codes in the 20 range at
another. I need write a formula which looks only at the first number of
the work code and if it is 1 return the value $18.50, if it is 2 then
return the value $21.36.

I know I can use an If statement to look at each number but this is just a
representative example. I actually have 6 different pay rates associated
with over 30 work codes.

10
11
12

20
21
22



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default Formula help

Try:

=IF(A1="","",LOOKUP(FLOOR(A1,10),{10,20,30,40,50,6 0;18.5,21.36,24.22,27.08,29.94,32.8}))

using your own cell reference for A1 and your own values for 18.5,21.36 etc.

However, to make it more flexable use:

=IF(A1="","",VLOOKUP(FLOOR(A1,10),$H$1:$I$6,2))

Where H1:I6 is a lookup table and H1:H6 is 10 to 60 respectively. This will
allow you to change the dollar values in the table without having to adjust
all the formulas.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Patrick C. Simonds" wrote in message
...
What I have are a series of Work Codes (shown Below). All work codes in
the 10 range are paid at one rate all work codes in the 20 range at
another. I need write a formula which looks only at the first number of
the work code and if it is 1 return the value $18.50, if it is 2 then
return the value $21.36.

I know I can use an If statement to look at each number but this is just a
representative example. I actually have 6 different pay rates associated
with over 30 work codes.

10
11
12

20
21
22



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"