Logic breakdown.

G

Guest

I'm looping through a variable number of row finding each unique value and
posting it on antoher sheet. I then want to create another table with 36
different calculations referencing two of the copied cells. They need to be
arranged like below.

Bobby Sue Form1(Cell 1) Form2(Cell 1) Form3(Cell 1) Form1(Cell 2)
Form2(Cell2) Form2(Cell2) etc.

I've got:
x = 0
For a = 1 to ALLROWS
If cell1.value is unique then ========This is a whole sting of if
statements actually and I won't bore you with them
x = x + 1
Copy cells a-f
1newsheet paste
2newsheet paste column a
cell cell(B"+Cstr(x)).formulaR1C1 = "=sum(1newsheet!cellR[x]C[1]).
cell cell(c"+Cstr(x)).formulaR1C1 = "=sum(1newsheet!cellR[x]C[0]).
cell cell(d"+Cstr(x)).formulaR1C1 = "=sum(1newsheet!cellR[x]C[-1]).
cell cell(e"+Cstr(x)).formulaR1C1 = "=sum(1newsheet!cellR[x]C[-1]).
cell cell(e"+Cstr(x)).formulaR1C1 = "=sum(1newsheet!cellR[x]C[-2]).
cell cell(e"+Cstr(x)).formulaR1C1 = "=sum(1newsheet!cellR[x]C[-3]).
<<<<should repeat through 36>>>>
Next a

I dont' want to write that many lines of forumlas and I know there's some
mathmatical correlation but it's just eluding me today.

It's the column reference that's giving me fits. It's a mutiple of 3 but it
repeats on the first instance (the 3rd formula is -1 and the forth is also
-1). This is probably an even solution for you guys. Help!
 

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