Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
steven
 
Posts: n/a
Default date number separation

Hi this might be easy for you guys...

In column A I got a date in the 1st row, number in the 2nd, date in the 3rd,
number in the 4th and so on up to row 200. I want dates only in column A and
numbers only in column B (the number that is directly below each date). Also
no blank cells in between the rows.

Of course i could copy paste everything and then manually delete every
second row but that would take forwever. any suggestions?

thanks

S.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default date number separation

Sub Test()
Dim iLastRow As Long
Dim i As Long
Dim nCalculation

With Application
.ScreenUpdating = False
nCalculation = .Calculation
.Calculation = xlCalculationManual
End With

iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
If Int(iLastRow / 2) * 2 < iLastRow Then iLastRow = iLastRow - 1
For i = iLastRow To 2 Step -2
Cells(i, "A").Copy Cells(i - 1, "B")
Rows(i).Delete
Next i

With Application
.Calculation = nCalculation
.ScreenUpdating = True
End With

End Sub



--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"steven" wrote in message
...
Hi this might be easy for you guys...

In column A I got a date in the 1st row, number in the 2nd, date in the

3rd,
number in the 4th and so on up to row 200. I want dates only in column A

and
numbers only in column B (the number that is directly below each date).

Also
no blank cells in between the rows.

Of course i could copy paste everything and then manually delete every
second row but that would take forwever. any suggestions?

thanks

S.



  #3   Report Post  
Posted to microsoft.public.excel.misc
Fred Smith
 
Posts: n/a
Default date number separation

If you don't want to use a macro, you can do it as follows:

1. Turn on DataFilter
2. Select the dates
3. Copy the visible cells to column B
4. Select the numbers
5. Copy the visible cells to column C
6. Delete column A

--
Regards,
Fred


"steven" wrote in message
...
Hi this might be easy for you guys...

In column A I got a date in the 1st row, number in the 2nd, date in the 3rd,
number in the 4th and so on up to row 200. I want dates only in column A and
numbers only in column B (the number that is directly below each date). Also
no blank cells in between the rows.

Of course i could copy paste everything and then manually delete every
second row but that would take forwever. any suggestions?

thanks

S.



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
NETWORKDAYS - Multiple Date Selection Annabelle Excel Discussion (Misc queries) 3 October 4th 05 07:04 PM
Number of Days in a Date Range tesouthworthjr Excel Discussion (Misc queries) 6 July 14th 05 09:45 PM
Where is DateDiff function in Excel 2002 ? Nigel Welch Excel Worksheet Functions 4 March 4th 05 03:18 PM
How do I convert a number formated as a date to text in Excel? BrotherNov Excel Discussion (Misc queries) 5 March 2nd 05 03:51 PM
unwanted number to date conversion while pasting data from web Jacek Excel Worksheet Functions 1 February 24th 05 02:59 PM


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