Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating Macro/Formula
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating Macro/Formula
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 -- Gary''s Student gsnu200707 "Diana" wrote: 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating Macro/Formula
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 -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Diana" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating formula or macro | Excel Worksheet Functions | |||
Help creating Formula (or macro) | Excel Discussion (Misc queries) | |||
Creating a macro to apply a formula to particular rows | Excel Programming | |||
Help with a macro creating a formula for a pivot table | Excel Programming | |||
Help creating a Macro or Formula | Excel Programming |