Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Look up cell content by type and copy to different cell

I have a column of cells that contain "date" cells, "text" cells and "number"
cells. Is there a function that I can use to enable me to copy the content
of a "date" cell into one column, "text" cell into a second column and
"number" cell into a third column? The version of my product is Excel 2003

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,071
Default Look up cell content by type and copy to different cell

Sam
Something like this macro may work for you. I assumed your original
data is in Column A starting with A2 down, Dates go in Column B, Text in
Column C and Numbers in Column D. HTH Otto
Sub DTS()
Dim rColA As Range
Dim i As Range
Set rColA = Range("A2", Range("A" & Rows.Count).End(xlUp))
Application.ScreenUpdating = False
For Each i In rColA
If IsDate(i.Value) Then
i.Copy Range("B" & Rows.Count).End(xlUp).Offset(1)
GoTo NextCell
End If
If IsNumeric(i.Value) Then
i.Copy Range("D" & Rows.Count).End(xlUp).Offset(1)
GoTo NextCell
End If
i.Copy Range("C" & Rows.Count).End(xlUp).Offset(1)
NextCell:
Next i
Application.ScreenUpdating = True
End Sub
"Sam Huleis" <Sam wrote in message
...
I have a column of cells that contain "date" cells, "text" cells and
"number"
cells. Is there a function that I can use to enable me to copy the
content
of a "date" cell into one column, "text" cell into a second column and
"number" cell into a third column? The version of my product is Excel
2003

Thank you



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
How do I copy a row depending on the content of a cell in the row Robert59 Excel Worksheet Functions 2 October 19th 07 06:26 PM
Copy row based on cell content billinr New Users to Excel 6 February 21st 07 01:49 PM
Copy content of cell to another depending on value of third cell(between worksheets) Zeljko Milak Excel Worksheet Functions 2 July 14th 06 07:17 PM
Using macro to copy a part of a cell content to next cell Charles Excel Discussion (Misc queries) 6 May 31st 06 05:57 AM
How do I copy the cell-content plus its comment to another cell ? Matthias Excel Worksheet Functions 2 March 14th 06 05:41 PM


All times are GMT +1. The time now is 12:57 PM.

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"