I am trying to estimate costs of different items and got stuck at one place,
and would greatly appreciate if someone could guide me.

Actually I have take Qty and costs of an item all in one row as follows:

q c q c q c q c Formula
Item a : 1 10 2 20 3 30 4 40
ITem B: 2 22 4 44 5 55 7 77

Now iam trying to get a relation for quantity (q) and Cost (c). We can use a
chart, add trend line and get relation, but my problem is i have many items
like this, so I thought is there any way where in , i can get a formula
showing the relation between q and c, and once i drag that formula it takes
on the quantity and cost of item b and update the formula.
To use the drag feature and update for all items at once, i took the data in
this way.
I tried trend functions but they are estimating for a particular q value,
but i want a formula showing, which can be dragged for the rest of the items.

Is this possible in excel directly or can we program it,
I hope someone can help me out with this.

thanks
vijaya