LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
PST PST is offline
external usenet poster
 
Posts: 29
Default To adapt macro for relative lines

hello

To adapt this part of macro below for relative lines

For J = 1 To 8

vN(J) = Sheets("feuil3").Cells(J).Value 'J avant

Next

Thank You

Sub Combin_6N()
Dim A As Integer, B As Integer, C As Integer
Dim D As Integer, E As Integer, F As Integer
Dim I As Long, J As Integer, vN(10) As Integer
Application.ScreenUpdating = False


For J = 1 To 8

vN(J) = Sheets("feuil3").Cells(J).Value 'J avant

Next




J = J - 1

ActiveCell.Offset(0, 17).Select
'Range("a32").Select ' Pour deplacer les combinaisons à l'endroit souhaité
I = 1
For A = 1 To J - 5
For B = A + 1 To J - 4
For C = B + 1 To J - 3
For D = C + 1 To J - 2
For E = D + 1 To J - 1
For F = E + 1 To J
ActiveCell.Offset(0, 0).Value = I
ActiveCell.Offset(0, 1).Value = vN(A)
ActiveCell.Offset(0, 2).Value = vN(B)
ActiveCell.Offset(0, 3).Value = vN(C)
ActiveCell.Offset(0, 4).Value = vN(D)
ActiveCell.Offset(0, 5).Value = vN(E)
ActiveCell.Offset(0, 6).Value = vN(F)
I = I + 1
ActiveCell.Offset(1, 0).Select
Select Case I
Case 60001, 120001, 180001, 240001, 300001, 360001, 420001, 480001, 540001
ActiveCell.Offset(-60000, 8).Select
End Select


Next F
Next E
Next D
Next C
Next B
Next A
Range("A1").Select
Cells(Lig, 20) = "toto" & " " & Lig

End Sub
 
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
How to change order of drop lines relative to the plotted data inExcel 2007 chart icystorm Excel Discussion (Misc queries) 0 April 1st 10 03:48 PM
Adapt hiding columns? PG Oriel Excel Programming 1 November 15th 06 11:12 AM
how can i adapt this formula? Gary Keramidas[_2_] Excel Programming 5 July 15th 05 08:51 PM
adapt macro monty Excel Worksheet Functions 3 March 9th 05 12:44 PM
Please help me to adapt this code. Rob Hargreaves Excel Programming 1 February 2nd 05 08:27 PM


All times are GMT +1. The time now is 02:11 AM.

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

About Us

"It's about Microsoft Excel"