I'm trying to create a do while loop where I can automatically fill cells A1:D1 with the numbers 4 to 1 respectively. can anyone help??
herephishy
0
Newbie Poster
Recommended Answers
Jump to PostThere r so many ways to loop.
Try this one.Dim colVar As Integer Dim colChars As String Dim cellAdd As String colChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" For colVar = 1 To 4 cellAdd = Mid(colChars, colVar, 1) & 1 Range(cellAdd).Value = colVar Next colVar
Hope this solves ur …
Jump to PostDim colVar As Integer Dim noOfCols As Integer Dim colChars As String Dim cellAdd As String colChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 'This piece of code holds good 'for Columns upto 26 only 'Because beyond that the col names will 'be AA, AB, AC,... 'Then u may have to create …
All 5 Replies
aktharshaik
16
Posting Whiz
aktharshaik
16
Posting Whiz
aktharshaik
16
Posting Whiz
herephishy
0
Newbie Poster
aktharshaik
16
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.