help - how to use a control list to expand data

D

D. Robertson

hello - i would like to use an excel table (table a) to insert
numerical ranges that would be used as "instructions" to expand the
data into a larger table (b). for example, if table 'a' has two rows
in which the first row reads 1, 4 and the second row reads 7, 10, i
would like the resulting table 'b' to have seven rows with the first
row being 1, 4, the second 2, 5, the third being 3, 6, etc. up to row
7 being 7, 10 where the first column is the index of the row (1
through 7) and the second column contains values linearly interpolated
between the table 'a' (column 2) starting and ending values. ideally
table 'a could also be extended to several rows, with interpolation
occuring between each pair of rows.

thanks for any suggestions. dgr
 
J

JE McGimpsey

If your instruction table is Sheet2!A1:B2 then in table b, use:

A1: =Sheet2!A$1
B1: =Sheet2!B$1

A2: =IF(A1 < Sheet2!A$2, A1+1,"")
B2: =IF(A1<>"",TREND(Sheet2!B$1:B$2,Sheet2!A$1:A$2,A1),"")

Copy A2 and B2 down at least as far as your data will reasonably go.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top