LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Number Value Check Question

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!

 
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
Check box question??? Pas Excel Discussion (Misc queries) 4 March 9th 10 05:41 PM
Check Box Question Ksean Excel Worksheet Functions 5 January 8th 10 02:25 AM
check box question mac Excel Worksheet Functions 3 September 1st 09 12:20 AM
Check Box Question John Bundy Excel Programming 1 December 28th 06 11:51 AM
Check Box Question Andrew Taylor Excel Programming 0 December 28th 06 10:39 AM


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