Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Simple problem, simple formula, no FUNCTION ! | Excel Worksheet Functions | |||
v Column??? In an interview, asked if i knew it...HELP | Excel Discussion (Misc queries) | |||
I THOUGHT I knew what I was doing | Charts and Charting in Excel | |||
Make it more simple or intuitive to do simple things | Charts and Charting in Excel |