|
-
Apr 12th, 2005, 09:40 AM
#1
Thread Starter
Addicted Member
I need a formula...[RESOLVED]
ok,
Pretty sure this is the right forum, as its more maths than Excel.
So here it is..i cant get my head around this even though i can see the pattern.
so:
If i select 2, i want to return 12 and 20
If i select 3, i want to return 19 and 27
if i select 4, i want to return 26 and 34
if i select 5, i want to return 33 and 41
the lower number difference is increasing by 1 for each increase in selected value
the higher number difference is decreasing by 1 for each increase in selected value.
e.g.
Code:
-4 = 12
2*8 = 16 -
+4 = 20
-5 = 19
3*8 = 24 -
+3 = 27
i just cant get my head around putting this into a useable code.
the below is for week2. i need a way to calculate the end numbers from what i already have.
VB Code:
StartRow = (SelectedWeek * 8) - 4
EndRow = (SelectedWeek * 8) + 4
TIA for any help
Last edited by Br1an_g; Apr 12th, 2005 at 10:39 AM.
Reason: resolved
if you fail to plan, you plan to fail
-
Apr 12th, 2005, 10:38 AM
#2
Thread Starter
Addicted Member
Re: I need a formula...
knew it was something simple.
given the above post the end formula is:
(A * B)-(A + C)
where
A = selected week
B = 8 (constant)
C = 2 (constant)
this gives me the StartRow and i add 8 to get the end row.
if you fail to plan, you plan to fail
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|