Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
stephen
 
Posts: n/a
Default selecting every eg 5th cell in a worksheet

How do i select every nth cell in worksheet. For example, if i wanted to
take a value at the beginning of each week (every 7th cell). Can i do this in
excel?

Stephen.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default selecting every eg 5th cell in a worksheet

You'll need a "helper" cell for this.

Assumption: data is in Cells: B2:B100 and is dates
A2: =WEEKDAY(B2,2)=1
Copy the formula down as far as you need it.

That formula will return TRUE for each column B value that is a Monday.
You could then use DataFilterAutofilter to select only TRUE values

OR

Assumption: data is in Cells: B2:B100 and is not Excel dates
A2: =MOD(ROW()+5,7)
copy that formula down

Adjust the 5 in the formula until the return value of 0 (zero) flags the
Mondays.
This time use DataFilterAutofilter to select only zero values.

Alternatively, using either formula you could select Col A,
then EditFind
Find What: 0 or TRUE (depending on which formula you used)
Look In: Values
Click [Find All]
Then hold down the [Ctrl] key and press A
That will actually select all of the zero or TRUE cells, respectively.

Does either method help?

***********
Regards,
Ron


"stephen" wrote:

How do i select every nth cell in worksheet. For example, if i wanted to
take a value at the beginning of each week (every 7th cell). Can i do this in
excel?

Stephen.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett
 
Posts: n/a
Default selecting every eg 5th cell in a worksheet

something like this in a macro

Sub everynthcell()
For i = 1 To 31 Step 7
MsgBox Cells(i, "f")
Next
End Sub

--
Don Guillett
SalesAid Software

"stephen" wrote in message
...
How do i select every nth cell in worksheet. For example, if i wanted to
take a value at the beginning of each week (every 7th cell). Can i do this
in
excel?

Stephen.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion of Cell Contents into a Functional Worksheet name ? GMJT Excel Worksheet Functions 1 August 21st 05 04:59 PM
macro help thephoenix12 Excel Discussion (Misc queries) 4 July 15th 05 05:57 PM
Why can't I link a cell from worksheet to another when it has an . FV Excel Worksheet Functions 0 April 7th 05 06:33 PM
How can I link a cell in one worksheet to a cell in another works. EWI_Guy Excel Worksheet Functions 3 April 5th 05 09:15 PM
excel locks up after selecting a cell sandenscot Excel Discussion (Misc queries) 7 January 28th 05 07:27 PM


All times are GMT +1. The time now is 03:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"