I have a table such as the one below, I would like to create a formula/macro
that will give my worksheet a comand to replace the text values on the left
with the numbers to their right. Is that possible??
ir 660
250
350
700
ar 987
320
710
Your help is very much appreciated
Gary''s Student - 20 Feb 2007 18:09 GMT
Try something like:
Sub diane()
Dim lastrow As Long
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To lastrow
If Application.WorksheetFunction.IsNumber(Cells(i, 1).Value) Then
Else
Cells(i, 1).Value = Cells(i, 2).Value
End If
Next
End Sub

Signature
Gary''s Student
gsnu200707
> I have a table such as the one below, I would like to create a formula/macro
> that will give my worksheet a comand to replace the text values on the left
[quoted text clipped - 9 lines]
>
> Your help is very much appreciated
Max - 20 Feb 2007 18:14 GMT
One formulas way ..
Assuming source data in cols A and B, from row1 down
In C1: =IF(A1="","",IF(ISTEXT(A1),B1,A1))
Copy C1 down, then copy col C & do a paste special as values to overwrite
col A. Clean up by deleting cols B and C

Signature
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
> I have a table such as the one below, I would like to create a formula/macro
> that will give my worksheet a comand to replace the text values on the left
[quoted text clipped - 9 lines]
>
> Your help is very much appreciated