#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Variable statement

I need a fn to substitute for a variable value in a SUM fn., in other words
my problem as indicated in below table

(Hrs) 2 2 3 1
Student
X X1 X1 X2 X1
Y X2 X2 X1 X2

For example, We have 2 students (X&Y) & Courses of different time
duration(2,2,3 & 1) hrs and the times of repetition for each course is X1 &
X2
So, for student X, the total hours will be
2*X1+2*X1+3*X2+1*X1= (hrs)

so, how to substitiue for X1 & X2 values in Excel sheets?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Variable statement

You have replies to yesterday's post.

doobie wrote:

I need a fn to substitute for a variable value in a SUM fn., in other words
my problem as indicated in below table

(Hrs) 2 2 3 1
Student
X X1 X1 X2 X1
Y X2 X2 X1 X2

For example, We have 2 students (X&Y) & Courses of different time
duration(2,2,3 & 1) hrs and the times of repetition for each course is X1 &
X2
So, for student X, the total hours will be
2*X1+2*X1+3*X2+1*X1= (hrs)

so, how to substitiue for X1 & X2 values in Excel sheets?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default Variable statement

I'm not certain I understand correctly, but I'll go with what I think I do
understand. What I 'understand' is that x1, x2, would be replace by actual
numbers?

Consider this layout on a worksheet:

A B C D E F
1 student/hrs 2 2 3 1
2 X 4 4 5 4
3 Y 5 5 4 5

In cell F2 put this formula: =$B$1*B2 + $C$1*C2 + $D$1*D2 + $E$1*E2
you can now fill that formula down the sheet in column F to get the results:
35 for student X on row 2 and 37 for student Y on row 3.

Or did I totally misunderstand?


"doobie" wrote:

I need a fn to substitute for a variable value in a SUM fn., in other words
my problem as indicated in below table

(Hrs) 2 2 3 1
Student
X X1 X1 X2 X1
Y X2 X2 X1 X2

For example, We have 2 students (X&Y) & Courses of different time
duration(2,2,3 & 1) hrs and the times of repetition for each course is X1 &
X2
So, for student X, the total hours will be
2*X1+2*X1+3*X2+1*X1= (hrs)

so, how to substitiue for X1 & X2 values in Excel sheets?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Variable statement

Dear JLatham,
Thanks for reply, but I think you didn't get my point
correctly, I need the table to look on the worksheet as below;
Row1..........(Hrs) 2 2 3 1
Row2.......X X1 X1 X2 X1
Row3.......Y X2 X2 X1 X2

And then on other cells or another worksheet, I put the values for X1 & X2,
with writing an excel fn. for the total hrs for X & Y containing the varibles
X1 & X2 which will be substituted.
i.e X= 2*X1+2*X1+3*X1+1*X1
Y= 2*X2+2*X2+3*X1+1*X2
So, every time i put new values for X1 or X2 it gives me a new result
according to the eqns.
Looking to hear from you again





"JLatham" wrote:

I'm not certain I understand correctly, but I'll go with what I think I do
understand. What I 'understand' is that x1, x2, would be replace by actual
numbers?

Consider this layout on a worksheet:

A B C D E F
1 student/hrs 2 2 3 1
2 X 4 4 5 4
3 Y 5 5 4 5

In cell F2 put this formula: =$B$1*B2 + $C$1*C2 + $D$1*D2 + $E$1*E2
you can now fill that formula down the sheet in column F to get the results:
35 for student X on row 2 and 37 for student Y on row 3.

Or did I totally misunderstand?


"doobie" wrote:

I need a fn to substitute for a variable value in a SUM fn., in other words
my problem as indicated in below table

(Hrs) 2 2 3 1
Student
X X1 X1 X2 X1
Y X2 X2 X1 X2

For example, We have 2 students (X&Y) & Courses of different time
duration(2,2,3 & 1) hrs and the times of repetition for each course is X1 &
X2
So, for student X, the total hours will be
2*X1+2*X1+3*X2+1*X1= (hrs)

so, how to substitiue for X1 & X2 values in Excel sheets?

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
Variable in if statement Francis Hookham Excel Worksheet Functions 9 December 12th 07 02:35 PM
IF Statement Variable Jase4now Excel Discussion (Misc queries) 3 September 25th 07 10:48 PM
How to pass a variable into an SQL statement CLamar Excel Discussion (Misc queries) 0 June 5th 06 02:17 PM
if than statement has too many variable repke New Users to Excel 1 May 2nd 06 02:00 PM
Add 2nd variable to if statement - ifAnd? Todd F. Excel Worksheet Functions 4 December 18th 04 07:49 PM


All times are GMT +1. The time now is 03:59 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"