I would need to know that A5:A21 would equal 17 cells.
Press ALT+F11... this will take you into the VB editor... locate the Immediate Window (it should be showing at the lower part of the screen (if you do not see it, press CTRL+G to make it appear)... then put this inside that window...
Range("I4").Resize(17) = "Yes"
The blue highlighted 17 is the total number of cells you want to fill (including the starting cell itself) and, with the text cursor located anywhere on that line, press the Enter key. Press ALT+Q to return to the worksheet.
Yep... that worked... only I put:
Range("A4).Resize(17) = "14"
Thank you!
Sorry about the "Yes" instead of 14... I ended up copy/pasting my test code and forgot to modify it for your specific question.Yep... that worked... only I put:
Range("A4).Resize(17) = "14"
type the following into the Name Box (the field to the left of the Formula Bar)...
=i4:index(i:i,4+17)
Thanks! Interestingly enough, the equal sign appears not to be required.Yet another cool trick Rick.
Sorry about the "Yes" instead of 14... I ended up copy/pasting my test code and forgot to modify it for your specific question.
Another way, maybe a little easier to work with... type the following into the Name Box (the field to the left of the Formula Bar)...
=i4:index(i:i,4+17)
and hit Enter (the 17 is the total number of cells you want to fill, change as needed, and note that you do not have to fill in the first cell beforehand). This will select the number of cells specified by the number highlighted in red... type the value you want to fill the cells with (14 for you example) into the Formula Bar and press CTRL+ENTER.
Glad you got it sorted..And it is a good solution.
Just FYI, that's not EXACTLY the same as what you were looking for in the post..
You were saying A4 AND the next 17 cells, for a total of 18 cells including A4.
That would end up as A4:A21
This
Range("A4).Resize(17) = "14"
Is a total of 17 cells, including A4, and ends up as A4:A20
I know this is just symantecs, I'm not trying to be thesicious.
But it's an important distinction to understand.