Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I have posted before and you have been of great help. I am relatively new at programming and working to piece together a program to sort through a very large database. Based on one cells value being even or odd, I need to then move that entire row to another worksheet. Here is my programming, thanks for your time: Sub WIDSSORT() Worksheets("Sheet2").Activate For Each c In Worksheets("Sheet2").Range("E2:E11450").Cells If c.Value / 2 Mod 0 = 1 Then GoTo moveroweven Else: GoTo moverowodd End If Next On Error Resume Next moveroweven: good = Rows.Active Rows(good).Cut Sheet57.Activate rowtomoveto = Str(Trim(Sheet57.UsedRange.Rows.Count + 1)) Rows(rowtomoveto).Select ActiveSheet.Paste moverowodd: good = Rows.Active Rows(good).Cut Sheet3.Activate rowtomoveto = Str(Trim(Sheet3.UsedRange.Rows.Count + 1)) Rows(rowtomoveto).Select ActiveSheet.Paste End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I apolagize, I forgot to mention that I am getting alot of problems
with this code, initially a subscript our of range error. Any help I can get would be great, thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sort rows and move borders with rows | New Users to Excel | |||
Can I link/lock rows so they move together in a sort? | Excel Worksheet Functions | |||
sort rows in alphabetical order and move the corresponding data | Excel Worksheet Functions | |||
Problems programming to the registry using RegEnumKey | Excel Programming | |||
Problems programming to the registry using RegEnumKey | Excel Programming |