Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I think this is a quick one:
I have a whole column of values that are formatted as "Date" but some of the values are actual dates, while some are text. I want to cut and move the text values and ignore the real dates, but the code below isn't working to pick out the numbers vs. text. If ActiveCell Like "#%" Then ActiveCell.Offset(1, 0).Activate Else ActiveCell.Select Selection.Cut ActiveCell.Offset(-1, 1).Activate ActiveSheet.Paste ActiveCell.Offset(1, -1).Activate End If ---Thanks! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this:
Sub test() Dim rng As Range, lrow As Long, i As Range lrow = Cells(Rows.Count, 1).End(xlUp).Row Set rng = Range(Cells(1, 1), Cells(lrow, 1)) For Each i In rng If Not Application.WorksheetFunction.IsNumber(i) Then i.Cut i.Offset(, 1) End If Next i End Sub -- Dan On Dec 20, 11:30 am, Kim wrote: Hi, I think this is a quick one: I have a whole column of values that are formatted as "Date" but some of the values are actual dates, while some are text. I want to cut and move the text values and ignore the real dates, but the code below isn't working to pick out the numbers vs. text. If ActiveCell Like "#%" Then ActiveCell.Offset(1, 0).Activate Else ActiveCell.Select Selection.Cut ActiveCell.Offset(-1, 1).Activate ActiveSheet.Paste ActiveCell.Offset(1, -1).Activate End If ---Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Check box question??? | Excel Discussion (Misc queries) | |||
Check Box Question | Excel Worksheet Functions | |||
check box question | Excel Worksheet Functions | |||
Check Box Question | Excel Programming | |||
Check Box Question | Excel Programming |