ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula to select every third cell in a very long column of data? (https://www.excelbanter.com/excel-discussion-misc-queries/166936-formula-select-every-third-cell-very-long-column-data.html)

jme951

Formula to select every third cell in a very long column of data?
 
Is there a formula or an easy way to select/highlight every third cell in a
very long column of data?
--
Thanks,
Jamie

FSt1

Formula to select every third cell in a very long column of data?
 
hi,
formulas return values from other cells but they cannot perform actions like
select another cell.
Multiple selects are possible but you can run into problems depending with
what you wish to do.
this macro will highlight every third cell
edit to fit your data.
Sub everythird()
Dim r As Range
Dim rd As Range
Set r = Range("A2")
Do While Not IsEmpty(r)
Set rd = r.Offset(3, 0)
r.Interior.ColorIndex = 40
Set r = rd
Loop
End Sub

regards
FSt1

"jme951" wrote:

Is there a formula or an easy way to select/highlight every third cell in a
very long column of data?
--
Thanks,
Jamie


Pete_UK

Formula to select every third cell in a very long column of data?
 
In a helper column adjacent to your set of data, you can enter a
formula like:

=MOD(ROW(),3)

and copy this down. This will return values of 0, 1, and 2 down the
column. If you apply an autofilter to this column you can select which
of these values you want to display - suppose you choose 0. Then you
can click on the first visible cell, hold down <SHIFT, press <End
once followed by <down, and then release <SHIFT. Without clicking on
another cell, use the pull-down on the filter to select All, and then
you will have every third cell highlighted.

Hope this helps.

Pete

On Nov 21, 6:51 pm, jme951 wrote:
Is there a formula or an easy way to select/highlight every third cell in a
very long column of data?
--
Thanks,
Jamie




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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com