ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Defining a type of the cell (https://www.excelbanter.com/excel-programming/372362-defining-type-cell.html)

backspace

Defining a type of the cell
 
How can I pre-define the type of the cell using VBA?
I need to pre-define the cell type from General to Text, Number or similar,
before inputing data within the specified cell...

Tnx.



Bob Phillips

Defining a type of the cell
 
Range("A1").NumberFormat = "@" 'text

Range("A1").NumberFormat = "#,##0.00"

Range("A1").NumberFormat = "General"

etc.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"backspace" wrote in message ...
How can I pre-define the type of the cell using VBA?
I need to pre-define the cell type from General to Text, Number or

similar,
before inputing data within the specified cell...

Tnx.






All times are GMT +1. The time now is 10:27 PM.

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