paneliyadhruv
New Member
- Joined
- May 21, 2018
- Messages
- 36
Dear all, I need help to include dynamic range in below macro.
In my sheet1 in cells D2 having start no 1 and E2 having end no 10. Then next range D3 having start no 21 and E3 having end no 30 till down for both columns D25 to E25. I need output of each range cell in columns start from AA, AB, AC and so on till all range end.
Need modification in above code to include range from two columns and output of each range in separate columns.
Thank you very much to all in advance.
In my sheet1 in cells D2 having start no 1 and E2 having end no 10. Then next range D3 having start no 21 and E3 having end no 30 till down for both columns D25 to E25. I need output of each range cell in columns start from AA, AB, AC and so on till all range end.
Need modification in above code to include range from two columns and output of each range in separate columns.
Thank you very much to all in advance.
Code:
[COLOR=#E56717][FONT=Consolas][B]Sub[/B][/FONT][/COLOR][COLOR=#141414][FONT=Consolas] FillIt()[/FONT][/COLOR]
[COLOR=#151B8D][FONT=Consolas][B]Dim[/B][/FONT][/COLOR][COLOR=#141414][FONT=Consolas] i [/FONT][/COLOR][COLOR=#151B8D][FONT=Consolas][B]As[/B][/FONT][/COLOR][COLOR=#F660AB][FONT=Consolas][B]Long[/B][/FONT][/COLOR][COLOR=#141414][FONT=Consolas], j [/FONT][/COLOR][COLOR=#151B8D][FONT=Consolas][B]As[/B][/FONT][/COLOR][COLOR=#F660AB][FONT=Consolas][B]Long[/B][/FONT][/COLOR]
[COLOR=#141414][FONT=Consolas]i = InputBox([/FONT][/COLOR][COLOR=#800000][FONT=Consolas]"Enter initial"[/FONT][/COLOR][COLOR=#141414][FONT=Consolas])[/FONT][/COLOR]
[COLOR=#141414][FONT=Consolas]j = InputBox([/FONT][/COLOR][COLOR=#800000][FONT=Consolas]"Ticket number"[/FONT][/COLOR][COLOR=#141414][FONT=Consolas])[/FONT][/COLOR]
[COLOR=#8D38C9][FONT=Consolas][B]With[/B][/FONT][/COLOR][COLOR=#141414][FONT=Consolas] Sheets([/FONT][/COLOR][COLOR=#800000][FONT=Consolas]"Sheet1"[/FONT][/COLOR][COLOR=#141414][FONT=Consolas]).Range([/FONT][/COLOR][COLOR=#800000][FONT=Consolas]"a1"[/FONT][/COLOR][COLOR=#141414][FONT=Consolas])[/FONT][/COLOR]
[COLOR=#141414][FONT=Consolas] .Value = i[/FONT][/COLOR]
[COLOR=#141414][FONT=Consolas] .AutoFill .Resize(j - I + 1, 1), xlFillSeries[/FONT][/COLOR]
[COLOR=#8D38C9][FONT=Consolas][B]End[/B][/FONT][/COLOR][COLOR=#8D38C9][FONT=Consolas][B]With[/B][/FONT][/COLOR]
[COLOR=#8D38C9][FONT=Consolas][B]End[/B][/FONT][/COLOR][COLOR=#E56717][FONT=Consolas][B]Sub[/B][/FONT][/COLOR]