View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default This should be simple if I knew any better...

Sub test()

Dim a As Long
Dim b As Long
Dim c As Long
Dim r As Long
Dim arr

arr = Range(Cells(1), Cells(6, 3))

r = 7

For a = 1 To 4
For b = 1 To 6
For c = 1 To 3
r = r + 1
Cells(r, 1) = arr(a, 1)
Cells(r, 2) = arr(b, 2)
Cells(r, 3) = arr(c, 3)
Next c
Next b
Next a

End Sub


RBS


wrote in message
...
So I want to make a every possible scenario sheet given the rows
(1,2,3,4...) and columns (a,b,c) listed below in sheet 1. I want to
make that into Sheet 2, eventually ending with the line on the bottom
there. Could you help me write a code that would do this for me?
This would be simple, except I don't know any better...

Thank you in advance!


Sheet 1
A B C
1 Andy Morning Baseball
2 Barry Breakfast Basketball
3 Carl Afternoon Football
4 David Lunch
Evening
Dinner


Sheet 2
A B C
1 Andy Morning Baseball
2 Andy Morning Basketball
3 Andy Morning Football
4 Andy Breakfast Baseball
5 Andy Breakfast Basketball
6 Andy Breakfast Football
7 Andy Afternoon Baseball

X Barry Morning Baseball
……..
XX David Dinner Football