앙꼬코인

Search
Close this search box.

GPT 에게 1부터 100 까지 합을 구하는 엑셀 VBA 코딩 부탁했다

1부터 100 까지 합 구하는 코딩을
GPT가 해주었다

VBA Code for Numbers

From 1 to 100 vba code

Here is some sample VBA code that will print the numbers from 1 to 100:

Copy code
Sub printNumbers()
For i = 1 To 100
Debug.Print i
Next i
End Sub
You can run the code by placing the cursor inside the Sub and press “F5” or “Run” in VBA editor. The numbers will be printed in the immediate window (also known as the debug window) of the VBA editor. If you want to print the numbers in a worksheet, you can use the following code:

Copy code
Sub printNumbers()
For i = 1 To 100
Cells(i, 1) = i
Next i
End Sub
This code will print the numbers in the first column of the active worksheet.

+3

로그인 하시고
하트를 보내세용

AD

Log in, leave a comment and earn ANKO
로그인해서 댓글 달고 ANKO 버세요.

Subscribe
Notify of
3 💬
좋아요 순
최신순 오래된순
Inline Feedbacks
View all comments