Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default selecting every other line in excel

Does anyone know how to select every other line in excel? I am not
talking about highlighting it but actually selecting it so I can copy
it over to another column. What is happening is that I use some
specialized scientific equipment and it spits out lots of numbers on
top of one another the top is the x-axis and the bottom is the y-axis
and they are just alternating back and forth until it is done. I
usually get over 2000 data points and I would like to graph this
without pressing control to select over a 1000 points.
Thank you for your support and help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default selecting every other line in excel

One way ..
Assuming your source data is running in A1 down
Put in B1:
=INDEX($A:$A,ROWS($1:1)*2-2+COLUMNS($A:A))
Copy B1 to C1, fill down as far as required to exhaust the data in col A
(until zeros appear)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
wrote in message
...
Does anyone know how to select every other line in excel? I am not
talking about highlighting it but actually selecting it so I can copy
it over to another column. What is happening is that I use some
specialized scientific equipment and it spits out lots of numbers on
top of one another the top is the x-axis and the bottom is the y-axis
and they are just alternating back and forth until it is done. I
usually get over 2000 data points and I would like to graph this
without pressing control to select over a 1000 points.
Thank you for your support and help.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default selecting every other line in excel

Assuming your data is in Column "A" and starting in A1, is your ultimate
goal to put the contents of A2 into B1 and so on down the column? Here is a
macro that will copy the alternate data in Column A (changeable with the
code) to the Column B of the preceding row and then delete this alternate
data row. Your data can start in either Row 1 or Row 2, but there must be an
even number of rows with data (because these are paired numbers). Anyway,
try the macro out on some sample data to see if it does what you are looking
for.

Sub XY()
Const Col As String = "B"
Dim X As Long
Dim FirstRow As Long
Dim LastRow As Long
LastRow = Cells(Rows.Count, Col).End(xlUp).Row
FirstRow = 1 - (LastRow Mod 2 = 1)
For X = LastRow To FirstRow + 1 Step -2
Cells(X, Col).Offset(-1, 1).Value = Cells(X, Col).Value
Cells(X, Col).EntireRow.Delete
Next
End Sub

Rick


wrote in message
...
Does anyone know how to select every other line in excel? I am not
talking about highlighting it but actually selecting it so I can copy
it over to another column. What is happening is that I use some
specialized scientific equipment and it spits out lots of numbers on
top of one another the top is the x-axis and the bottom is the y-axis
and they are just alternating back and forth until it is done. I
usually get over 2000 data points and I would like to graph this
without pressing control to select over a 1000 points.
Thank you for your support and help.


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
change last serie to be line in the line-column Excel chart in Wor Eric Charts and Charting in Excel 3 June 30th 07 04:58 PM
counting line by line matches of 2 columns possible in excel ? Medikto D Excel Discussion (Misc queries) 3 June 1st 06 05:46 PM
Selecting a line from a drop-down list Jonibenj Excel Discussion (Misc queries) 4 December 11th 05 05:46 PM
A 2 line text showing up in the Cell in Excel prints in 1 line Danny Excel Discussion (Misc queries) 6 July 12th 05 08:47 PM
How do I subtract line k from line L in excel? Heidi Excel Discussion (Misc queries) 2 May 3rd 05 08:34 PM


All times are GMT +1. The time now is 05:30 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"