Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to set cell value at certain intervals

Status
Not open for further replies.

flashbbeb

MIS
Mar 29, 2005
106
US
Hi all,

I'm not sure if a macro or a formula would work best for this, but every 17 rows, I need the cell in the A column to be set as "Part".

Thanks,
eb
 



Hi,

That seems to be a peculiar requirement.

What is the reason for this?

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Well...I found and tweaked something I found via Google to mark the rows every 17th row.

I'm doing this to get a random sample of employees that will eventually be asked to complete a job satisfaction survey. I figured this would be a quick way to do it - and it was.

Code:
Sub markRow()

Dim i As Integer

For i = 10 To 7200 Step 17

Range("A" & i).Select
Range("A" & i).Value = "participant"
Next i

End Sub
 




What about using the RAND() function?

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top