View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default w/s Formula to Automatically Create Two 2-equi-interval Tables ??

Monir,

1) Given:
no. of X values::A2 = 8 (<= 30)
max. X value::A3 = 1.00
min. X value ::A4 = 0.93

no. of Y values::A2 = 10 (<= 50)
max. Y value::A3 = 0.00
min. Y value ::A4 = -13.50


I'm assuming you meant the Y values are in B2,B3,B4

In A5
=IF(INT((ROW()-ROW($A$4))/($B$2+1))< (((ROW()-ROW($A$4))/($B$2+1))),
IF($A$4+INT((ROW()-ROW($A$4))/($B$2+1))*($A$3-$A$4)/($A$2-1)
<=$A$3,$A$4+INT((ROW()-ROW($A$4))/($B$2+1))*($A$3-$A$4)/($A$2-1),""),"")

In B5
=IF(INT((ROW()-ROW($A$4))/($B$2+1))< (((ROW()-ROW($A$4))/($B$2+1))),
IF($A$4+INT((ROW()-ROW($A$4))/($B$2+1))*($A$3-$A$4)/($A$2-1)
<=$A$3,$B$4+MOD((ROW()-ROW($B$5)),($B$2+1))*($B$3-$B$4)/($B$2-1),""),"")

In C5
=IF(INT((ROW()-ROW($A$4))/($A$2+1))< (((ROW()-ROW($A$4))/($A$2+1))),
IF($A$4+INT((ROW()-ROW($A$4))/($A$2+1))*($A$3-$A$4)/($A$2+1)
<=$A$3,$A$4+MOD((ROW()-ROW($A$5)),($A$2+1))*($A$3-$A$4)/($A$2-1),""),"")

In D5
=IF(INT((ROW()-ROW($A$4))/($A$2+1))< (((ROW()-ROW($A$4))/($A$2+1))),
IF($A$4+INT((ROW()-ROW($A$4))/($A$2+1))*($A$3-$A$4)/($A$2+1)
<=$A$3,$B$4+INT((ROW()-ROW($B$4))/($A$2+1))*($B$3-$B$4)/($B$2-1),""),"")

Take out the extra line breaks, then copy down 1500 rows.

HTH,
Bernie
MS Excel MVP


"monir" wrote in message
...
Hello;

Your help would be greatly appreciated.

1) Given:
no. of X values::A2 = 8 (<= 30)
max. X value::A3 = 1.00
min. X value ::A4 = 0.93

no. of Y values::A2 = 10 (<= 50)
max. Y value::A3 = 0.00
min. Y value ::A4 = -13.50

2) I need to automatically create two 2-equi-interval X-Y tables by changing
any of the above 6 values, and:
a. X and Y are in ascending order in each table;
b. Table 1 (starts at A5:B5): Y changes faster for each value of X; and
c. Table 2 (starts at C5:D5): X changes faster for each value of Y.

3) For the above example, the TWO tables should look like:

....TABLE 1..........TABLE 2
...X1.......Y1........X2........Y2
0.930 -13.500 0.930 -13.500
0.930 -12.000 0.940 -13.500
0.930 -10.500 0.950 -13.500
0.930 -9.000 0.960 -13.500
0.930 -7.500 0.970 -13.500
0.930 -6.000 0.980 -13.500
0.930 -4.500 0.990 -13.500
0.930 -3.000 1.000 -13.500
0.930 -1.500 blank....blank
0.930 0.000 0.930 -12.00
blank....blank 0.940 -12.00
0.940 -13.500 0.950 -12.00
0.940 -12.000 0.960 -12.00
0.940 -10.500 0.970 -12.00
0.940 -9.000 0.980 -12.00
0.940 -7.500 0.990 -12.00
.......................1.000 -12.00
.......................blank....blank
...........................................
.last segmt........last segmt....
1.000 -13.500 0.930 0.000
1.000 -12.000 0.940 0.000
1.000 -10.500 0.950 0.000
1.000 -9.000 0.960 0.000
1.000 -7.500 0.970 0.000
1.000 -6.000 0.980 0.000
1.000 -4.500 0.990 0.000
1.000 -3.000 1.000 0.000
1.000 -1.500 blank...blank
1.000 0.000

What are the formulas to enter at the start of tables (cells A5, B5, C5, D5)
?? ...to be copied down to the max anticipated 30*50 rows ??
{It would be a bonus to have 2 blank cells at the end (or start) of each
segment in each Table (as shown above)}.

Thank you kindly.