Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Public Sub FiftyFifty1()
Dim x As Integer, y As Integer With ActiveSheet For y = 1 To 50 For x = 0 To y .Cells(y, 1 + x).Value = y - x & "/" & x Next x Next y End With End Sub The above bit of code generates a bunch of pairs of numbers in a wedge- shaped pattern on a spreadsheet. If you copy and run it you'll see the pattern. What I want is to generate another wedge-shaped pattern of pairs of numbers starting on line 51 and going to line 100, where line 51 has 50 elements: 50/1, 49/2, 48/3 . . . 3/48, 2/49, 1/50 (all pairs add up to 51) line 52 has 49 elements: 50/2, 49/3, 48/4 . . . 4/48, 3/49, 2/50. (all pairs add up to 52) Line 99 has 2 elements: 50/49, 49/50 (add up to 99) Line 100 has only: 50/50. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating a Drop Down List with Step by Step Instructions for 2007 | Excel Worksheet Functions | |||
Need step by step to add invoice numbering to excel template | New Users to Excel | |||
Need step by step instructions to try, not a demo. Can't remember | Excel Worksheet Functions | |||
What is the step-by-step procedure for making a data list? | Excel Discussion (Misc queries) | |||
I need step by step instructions to create a macro for 10 imbedde. | Excel Worksheet Functions |