View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RominallL RominallL is offline
external usenet poster
 
Posts: 26
Default Logic breakdown.

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!