#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
external usenet poster
 
Posts: 4
Default Elseif?

Hey there,

I have a spreadsheet that I need to calculate the total instruction cost
of a vendor. I have 5 columns: Number of students (E) - Number of
sessions (F) - Length of class in hours (G) - Vendor Rate (H) - Charge
by Hour\Session\Person (I).
In my Total Instruction Cost column (J), I need it to calculate based on
what's in the "Charge By" column (I):
So, if I = "hour" then multiply f*g*h
if I = "session" then f*h
if I = "person" then e*f*h

I just haven't figured out how to write the formula for that. Any help?

Thanks so much,

ibk
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
external usenet poster
 
Posts: 8,856
Default Elseif?

Assuming the first row of data is row 2, then put this in J2:

=IF(I2="hour",H2,IF(I2="person",E2,IF(I2="session" ,1,0)))*F2*H2

Hope this helps.

Pete

On Nov 24, 6:37*pm, ibrokit wrote:
Hey there,

I have a spreadsheet that I need to calculate the total instruction cost
of a vendor. I have 5 columns: Number of students (E) - Number of
sessions (F) - Length of class in hours (G) - Vendor Rate (H) - Charge
by Hour\Session\Person (I).
In my Total Instruction Cost column (J), I need it to calculate based on
what's in the "Charge By" column (I):
So, if I = "hour" then multiply f*g*h
if I = "session" then f*h
if I = "person" then e*f*h

I just haven't figured out how to write the formula for that. Any help?

Thanks so much,

ibk


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
external usenet poster
 
Posts: 8,856
Default Elseif?

Sorry, slight mistake:

=IF(I2="hour",G2,IF(I2="person",E2,IF(I2="session" ,1,0)))*F2*H2

Hope this helps.

Pete

On Nov 24, 6:48*pm, Pete_UK wrote:
Assuming the first row of data is row 2, then put this in J2:

=IF(I2="hour",H2,IF(I2="person",E2,IF(I2="session" ,1,0)))*F2*H2

Hope this helps.

Pete

On Nov 24, 6:37*pm, ibrokit wrote:



Hey there,


I have a spreadsheet that I need to calculate the total instruction cost
of a vendor. I have 5 columns: Number of students (E) - Number of
sessions (F) - Length of class in hours (G) - Vendor Rate (H) - Charge
by Hour\Session\Person (I).
In my Total Instruction Cost column (J), I need it to calculate based on
what's in the "Charge By" column (I):
So, if I = "hour" then multiply f*g*h
if I = "session" then f*h
if I = "person" then e*f*h


I just haven't figured out how to write the formula for that. Any help?


Thanks so much,


ibk- Hide quoted text -


- Show quoted text -


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
external usenet poster
 
Posts: 303
Default Elseif?

=if(I3="hour",F3*G3*H3,if(I3="session",F3*H3,E3*F3 *H3))
should do it

--
Greetings from New Zealand


"ibrokit" wrote in message
...
Hey there,

I have a spreadsheet that I need to calculate the total instruction cost
of a vendor. I have 5 columns: Number of students (E) - Number of sessions
(F) - Length of class in hours (G) - Vendor Rate (H) - Charge by
Hour\Session\Person (I).
In my Total Instruction Cost column (J), I need it to calculate based on
what's in the "Charge By" column (I):
So, if I = "hour" then multiply f*g*h
if I = "session" then f*h
if I = "person" then e*f*h

I just haven't figured out how to write the formula for that. Any help?

Thanks so much,

ibk



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
external usenet poster
 
Posts: 3,346
Default Elseif?

Hi,

=IF(I1="Hours",G1,IF(I1="Person",E1,1)*F1*H1

If this helps, please click the Yes button

Cheers,
Shane Devenshire

So, if I = "hour" then multiply f*g*h
if I = "session" then f*h
if I = "person" then e*f*h



"ibrokit" wrote:

Hey there,

I have a spreadsheet that I need to calculate the total instruction cost
of a vendor. I have 5 columns: Number of students (E) - Number of
sessions (F) - Length of class in hours (G) - Vendor Rate (H) - Charge
by Hour\Session\Person (I).
In my Total Instruction Cost column (J), I need it to calculate based on
what's in the "Charge By" column (I):
So, if I = "hour" then multiply f*g*h
if I = "session" then f*h
if I = "person" then e*f*h

I just haven't figured out how to write the formula for that. Any help?

Thanks so much,

ibk



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
external usenet poster
 
Posts: 4
Default Elseif?

Bill Kuunders wrote:
=if(I3="hour",F3*G3*H3,if(I3="session",F3*H3,E3*F3 *H3))
should do it

This is exactly what I ended up doing after I thought it over a little
more. Thanks to you, Pete and Shane for your assistance.

ibk
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile Error ElseIf Without If.........But there is an If ! ??? dim Excel Discussion (Misc queries) 11 December 30th 07 07:01 PM
if elseif flow23 Excel Discussion (Misc queries) 0 November 14th 05 02:09 PM
elseif formula macrodummy Excel Discussion (Misc queries) 1 October 7th 05 01:43 PM


All times are GMT +1. The time now is 11:40 PM.

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"