Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This might work better. I re-read your explanation and saw that you want it
on the same sheet. Sub moveNumbs() lastRow = Worksheets(1).UsedRange.SpecialCells(xlCellTypeLas tCell).Row + 1 For i = 1 To lastRow If Cells(i, 1) < "" And IsNumeric(Cells(i, 1)) Then Cells(i, 1).Copy If Cells(1, 3) = "" Then ActiveSheet.Cells(1, 3).PasteSpecial Paste:=xlValues Else Cells(Cells(Rows.Count, 3).End(xlUp).Row + 1, 3).PasteSpecial Paste:=xlValues End If End If If Cells(i, 2) < "" And IsNumeric(Cells(i, 2)) Then Cells(i, 2).Copy If Cells(1, 4) = "" Then ActiveSheet.Cells(1, 4).PasteSpecial Paste:=xlValues Else Cells(Cells(Rows.Count, 4).End(xlUp).Row + 1, 4).PasteSpecial Paste:=xlValues End If End If Next Application.CutCopyMode = False End Sub " wrote: There can be as little as 1 in A and 1 in B and as high as 10 in A and 10 in B If I could get them to the top of C and D in the same sheet I can do the rest. The other factor that I require is lets say there is a number in A:137 and A:3000, I want the number in A137 at the very top and I need the same of B. Am I making any sence? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I sum up random cells | Excel Worksheet Functions | |||
How to select other random cells | Excel Worksheet Functions | |||
#Value in random cells | Excel Worksheet Functions | |||
random merged cells | Excel Discussion (Misc queries) | |||
fill random cells | Excel Programming |