Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Deb Deb is offline
external usenet poster
 
Posts: 102
Default select every other cell in a column

How can I select every other cell in Row B, from row 2 thru row 250?
Data looks like this...

Item1
price1
Item2
price2

I need...

Item1 price1
Item2 price2

so if I can select every other cell in the column, i can move them the
correct column.

--
deb
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default select every other cell in a column

Hi,

With a Macro. Right click your sheet tab, view code and psate this in and
run it

Sub everyother()
Dim rRow As Long, rEverySecond As Range
On Error Resume Next
For rRow = 2 To 250 Step 2
If rEverySecond Is Nothing Then
Set rEverySecond = Cells(rRow, "B")
Else
Set rEverySecond = Union(rEverySecond, Cells(rRow, "B"))
End If
Next rRow
rEverySecond.Select
End Sub

Mike

"deb" wrote:

How can I select every other cell in Row B, from row 2 thru row 250?
Data looks like this...

Item1
price1
Item2
price2

I need...

Item1 price1
Item2 price2

so if I can select every other cell in the column, i can move them the
correct column.

--
deb

  #3   Report Post  
Posted to microsoft.public.excel.misc
Don Don is offline
external usenet poster
 
Posts: 487
Default select every other cell in a column

I like Mike's option , but you can also do a formula in cell b, say item1 is
in cell A1 , then in cell B1 put =A2 and drag that down. Then in C1 put 1,
then in c2 put =if(c1=1,0,1) and drag that down. Then filter on column C so
only the 1's are showing. You can copy this or what ever but a line with
item1, price , and 1 will be showing.

good luck

"deb" wrote:

How can I select every other cell in Row B, from row 2 thru row 250?
Data looks like this...

Item1
price1
Item2
price2

I need...

Item1 price1
Item2 price2

so if I can select every other cell in the column, i can move them the
correct column.

--
deb

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default select every other cell in a column

Instead of copying and pasting, try this formula, which will give you the
data configuration that you're looking for.

Enter this formula *anywhere*, then copy across one column.
Then, select *both* cells, and drag down the 2 cell selection as far as
needed.

=INDEX($B$2:$B$250,2*ROWS($1:1)+COLUMNS($A:A)-2)

After you have all the data displayed as needed, you can remove the formulas
and leave just the data behind by copying to itself and then "Paste
Special", and click on "Values", then <OK.

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"deb" wrote in message
...
How can I select every other cell in Row B, from row 2 thru row 250?
Data looks like this...

Item1
price1
Item2
price2

I need...

Item1 price1
Item2 price2

so if I can select every other cell in the column, i can move them the
correct column.

--
deb


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
Formula to select every third cell in a very long column of data? jme951 Excel Discussion (Misc queries) 2 November 21st 07 07:17 PM
Using formulas to select cells (Ex: Select every nth cell in a col Lakeview Photographic Services Excel Discussion (Misc queries) 2 March 15th 07 02:17 PM
Help tonight?!! select rows based on cell value in a column Lighthouse1 Excel Worksheet Functions 1 January 31st 07 02:57 AM
how do i select every other cell in a column? every nth cell? froot_broot Excel Discussion (Misc queries) 5 March 23rd 05 06:03 PM
I want to select the first blank cell in column A Greegan Excel Worksheet Functions 7 March 13th 05 12:56 PM


All times are GMT +1. The time now is 01:36 AM.

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"