#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default if formula

i need a formula that will do the following function: If A1 equals either
D/S, Sunday, or Daily and write 16.84 for D/S, 8.48 for Sunday, 8.06 for Daily
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 703
Default if formula

Hi

Try this:

=IF(A1="D/S",16.84,IF(A1="Sunday",8.48,IF(A1="Daily",8.06,"" )))

Regards,
Per

On 7 Maj, 00:43, MSKC LLC wrote:
i need a formula that will do the following function: *If A1 equals either
D/S, Sunday, or Daily and write 16.84 for D/S, 8.48 for Sunday, 8.06 for Daily


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 140
Default if formula

This could be done using nested "if" functions, but it get long and messy.

It would be better to write a custom Excel worksheet function instead.
1. Open the VB editor.
2. Add a code module to the workbook.
3. write the following function;

Function MyConverter(InputValue as string) as single

Select Case InputValue
Case "D/S"
MyConverter=16.84
Case "Sunday"
MyConverter=8.48
Case "Daily"
MyConverter=8.06
End Select

End Function

4. Now in a cell like B1 enter the function call

=MyConverter(A1)

B1 should convert from cell A1.



Dennis


"MSKC LLC" wrote in message
...
i need a formula that will do the following function: If A1 equals either
D/S, Sunday, or Daily and write 16.84 for D/S, 8.48 for Sunday, 8.06 for
Daily


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 05:01 AM.

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

About Us

"It's about Microsoft Excel"