ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to do that (https://www.excelbanter.com/excel-programming/359523-how-do.html)

lwong[_2_]

how to do that
 

hello, suppose there are 100 cells, A1.......A100, they have the values
1.....100
how can I programming it when I open the worksheet, the cells already
contain those numbers?Thank you.


--
lwong
------------------------------------------------------------------------
lwong's Profile: http://www.excelforum.com/member.php...o&userid=33707
View this thread: http://www.excelforum.com/showthread...hreadid=535213


Dave Patrick

how to do that
 
Dim i As Integer
For i = 1 To 100
Sheets(1).Range("A" & i) = i
Next

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"lwong" wrote:
|
| hello, suppose there are 100 cells, A1.......A100, they have the values
| 1.....100
| how can I programming it when I open the worksheet, the cells already
| contain those numbers?Thank you.
|
|
| --
| lwong
| ------------------------------------------------------------------------
| lwong's Profile:
http://www.excelforum.com/member.php...o&userid=33707
| View this thread: http://www.excelforum.com/showthread...hreadid=535213
|



Gary''s Student

how to do that
 
Open a blank worksheet and enter the desired numbers. Then save the
workbook. Then close the workbook.

Whenever you re-open the workbook, the numbers will already be there!
--
Gary's Student


"lwong" wrote:


hello, suppose there are 100 cells, A1.......A100, they have the values
1.....100
how can I programming it when I open the worksheet, the cells already
contain those numbers?Thank you.


--
lwong
------------------------------------------------------------------------
lwong's Profile: http://www.excelforum.com/member.php...o&userid=33707
View this thread: http://www.excelforum.com/showthread...hreadid=535213



lwong[_3_]

how to do that
 

good suggestion of Gray's student, but dont forget here is programming
area.
Thank you, Dave Patrick


--
lwong
------------------------------------------------------------------------
lwong's Profile: http://www.excelforum.com/member.php...o&userid=33707
View this thread: http://www.excelforum.com/showthread...hreadid=535213


Dave Patrick

how to do that
 
You're welcome.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"lwong" wrote:
|
| good suggestion of Gray's student, but dont forget here is programming
| area.
| Thank you, Dave Patrick
|
|
| --
| lwong
| ------------------------------------------------------------------------
| lwong's Profile:
http://www.excelforum.com/member.php...o&userid=33707
| View this thread: http://www.excelforum.com/showthread...hreadid=535213
|




All times are GMT +1. The time now is 07:44 PM.

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