ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macro based on text or number (https://www.excelbanter.com/excel-programming/442499-macro-based-text-number.html)

JOSEPH WEBER

macro based on text or number
 
I want to do an if statement within a macro that will copy and paste to
another cell, a field that is text. Anything numerical should be skipped. How
do I do this?

JLGWhiz[_2_]

macro based on text or number
 
Here is one way.

Set rng = Sheets("Sheet1).Range("A1")
If Not IsNumeric(rng) Then
rng.Copy Sheets("Sheet2").Range("A2")
End If


"JOSEPH WEBER" wrote in message
...
I want to do an if statement within a macro that will copy and paste to
another cell, a field that is text. Anything numerical should be skipped.
How
do I do this?





All times are GMT +1. The time now is 09:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com