Move numeric over one cell

  • Thread starter Thread starter Annette
  • Start date Start date
A

Annette

This the last question - column F contains one letter characters (A - Z),
but also it pulled in 7 digit numbers. That set of numbers needs to be
moved over one cell cell to the right. There is nothing to the right of it.

Example

8621526

M
8699880

Z
8126702


All the numbers need to be moved over into the column G. How can I do that?

Thanks!

Annette
 
Hi
not quite sure but try in G1
=IF(ISNUMBER(F1),F1,"")
and copy down
 
I thought I had responded to this, but don't see the response ... I was
looking to put this into code as this is all a part of a bigger macro. How
could I do this using a macro?
 
Hi Annette
try something like

Sub change_rows()
Dim RowNdx As Long
Dim LastRow As Long
Application.ScreenUpdating = False
LastRow = ActiveSheet.Cells(Rows.Count, "F").End(xlUp).row
For RowNdx = LastRow To 1 Step -1
with Cells(RowNdx, "F")
if IsNumeric(.value) then
.offset(0,1).value = .value
End If
end with
Next RowNdx
Application.ScreenUpdating = True
End Sub
 
Okay .. it copied it over one cell ... how do I move it ... cut and paste it
.... ?
 
Hi
one way:
Sub change_rows()
Dim RowNdx As Long
Dim LastRow As Long
Application.ScreenUpdating = False
LastRow = ActiveSheet.Cells(Rows.Count, "F").End(xlUp).row
For RowNdx = LastRow To 1 Step -1
with Cells(RowNdx, "F")
if IsNumeric(.value) then
.offset(0,1).value = .value
.clearcontents
End If
end with
Next RowNdx
Application.ScreenUpdating = True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top