ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to use a conversion function in a whole column (https://www.excelbanter.com/excel-programming/272804-how-use-conversion-function-whole-column.html)

Terence[_2_]

How to use a conversion function in a whole column
 
Hi,

I would like to apply a conversion function, e.g. Cstr(),
to the values in the whole column ,e.g. Column A (Start
from cell A2 since A1 is the column heading). How to do it?
Thanks a lot!

Terence

Sander Lablans

How to use a conversion function in a whole column
 
On Mon, 28 Jul 2003 01:46:49 -0700, Terence wrote:

Hi,

I would like to apply a conversion function, e.g. Cstr(),
to the values in the whole column ,e.g. Column A (Start
from cell A2 since A1 is the column heading). How to do it?
Thanks a lot!

Terence


count1 = Application.WorksheetFunction.CountA(Columns(1)) - 1

range("A1").activate
for i = 1 to count1
activecell.offset(i,1).value = cstr(activecell.offset(i,0))
next i

Good luck


All times are GMT +1. The time now is 09:31 PM.

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