Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default This should be simple if I knew any better...

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Simple problem, simple formula, no FUNCTION ! Ron@Buy Excel Worksheet Functions 6 September 28th 07 04:51 PM
v Column??? In an interview, asked if i knew it...HELP justywusty Excel Discussion (Misc queries) 9 April 17th 06 04:41 PM
I THOUGHT I knew what I was doing RJB Charts and Charting in Excel 7 September 12th 05 08:37 PM
Make it more simple or intuitive to do simple things Vernie Charts and Charting in Excel 1 March 16th 05 04:01 AM


All times are GMT +1. The time now is 12:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"