Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Need to select non-adjacent cells with regular interval

This sounds like a similar problem to "select every 70th cell", and I think
a macro is the solution, but I can't figure out how to write it. I need to
select every 4th or 5th cell in a column, compile the values from them into
either a vertical or horizontal series, and plot that series.

I use excel for a large modeling spreadsheet, where the columns represent
displacement and the rows are time, but it takes several rows to track all of
the events in one time interval. When done, I can select any row and plot
those values and get a visualization of distribution over distance at a fixed
time. But
what I really want is to visualize at a fixed distance (a selected column),
how distribution changes with time. To do this, I have to select every 4th
or 5th cell in that column (depending on the particular model version) and
plot those values.
The ideal solution would be a macro where the desired column (distance) is
requested as an input and then the plot is displayed.

I have never worked with macros, so perhaps some general help and a
reference to a tutorial (if one exists) would be the best bet. TIA.

  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Need to select non-adjacent cells with regular interval

"rickhoff" wrote:
.. select every 4th or 5th cell in that column


If source data is in A1 down,
to extract every 4th cell in that column

Put this in any starting cell desired, say in E2:
=INDEX(A:A,ROWS($1:1)*4-3)
Copy down as far as required

To extract every 5th cell in that column, use:
=INDEX(A:A,ROWS($1:1)*5-4)

And so on. Adapt to suit.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,180
Default Need to select non-adjacent cells with regular interval

Use Pivot Table.
No formulas needed.
Charts created automatically.
http://www.freefilehosting.net/download/3b401
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Need to select non-adjacent cells with regular interval

On Sunday, January 27, 2008 5:59:00 AM UTC+7, Max wrote:
"rickhoff" wrote:
.. select every 4th or 5th cell in that column


If source data is in A1 down,
to extract every 4th cell in that column

Put this in any starting cell desired, say in E2:
=INDEX(A:A,ROWS($1:1)*4-3)
Copy down as far as required

To extract every 5th cell in that column, use:
=INDEX(A:A,ROWS($1:1)*5-4)

And so on. Adapt to suit.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


Great!
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
Select filled region only in non-adjacent columns hmm Excel Discussion (Misc queries) 1 August 19th 07 03:38 PM
Select an item from dropdown list but return value from adjacent c StevanT Excel Discussion (Misc queries) 4 March 17th 07 12:39 PM
How do I Select Multiple Non Adjacent Rows based on a cell value? avalynch Excel Worksheet Functions 2 October 1st 06 07:45 PM
My pivot table does not accept select non-adjacent columns? UT Excel Discussion (Misc queries) 0 September 27th 06 11:42 PM
Select a range of non-adjacent cells in Excel? hodgsonk Excel Worksheet Functions 12 July 1st 06 04:34 AM


All times are GMT +1. The time now is 07:20 AM.

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

About Us

"It's about Microsoft Excel"