Skip to content
조회 수 16349 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄


 Excel VBA) Delete Column Excel VBA - 칼럼 지우기


To delete column in Excel VBA you can first run this Sub to enter data into a spreadsheet if you are starting with a blank workbook.

Sub Mulptiplication_Table()
Range("A1").Select
ActiveCell.FormulaR1C1 = "1"
Range("B1").Select
ActiveCell.FormulaR1C1 = "2"
Range("A1:B1").Select
Selection.AutoFill Destination:=Range("A1:J1"), Type:=xlFillDefault
Range("A1:J1").Select
Range("A2").Select
ActiveCell.FormulaR1C1 = "2"
Range("A1:A2").Select
Selection.AutoFill Destination:=Range("A1:A10"), Type:=xlFillDefault
Range("A1:A10").Select
Range("B2").Select
ActiveCell.FormulaR1C1 = "=R[-1]C*RC[-1]"
Range("B2").Select
Selection.AutoFill Destination:=Range("B2:C2"), Type:=xlFillDefault
Range("B2:C2").Select
Range("B2").Select
ActiveCell.FormulaR1C1 = "=R1C*RC1"
Range("B2").Select
Selection.AutoFill Destination:=Range("B2:J2"), Type:=xlFillDefault
Range("B2:J2").Select
Selection.AutoFill Destination:=Range("B2:J10"), Type:=xlFillDefault
Range("B2:J10").Select
End Sub
In the following Sub, you can use either Columns("F:F") or Columns(3) depending on the column you want to delete. The Columns property takes a Range or a numerical value.
Sub Delete_Column_Excel_VBA()
Columns("F:F").Select
Selection.Delete Shift:=xlToLeft
End Sub
The Rows property also takes a Range or a numerical value.
Sub Delete_Row_Excel_VBA()
Rows("7:7").Select
Selection.Delete Shift:=xlUp
End Sub
In both the above examples of Selection.Delete, you do not need the "Shift:=" xlToLeft or xlUp since you are deleting a whole Row or Column. If you were deleting a Range of cells that are not a whole Row or Column you would want to specify from which direction you want the cells to move from with xlToLeft, xlToRight, xlUp, and xlDown. 

로그인 후 댓글쓰기가 가능합니다.

?

List of Articles
번호 분류 제목 날짜 조회 수
697 AutoHotKey AutoHotkey COM Standard Library 2 2011.02.10 18046
696 AutoHotKey IE.ahk COM 환상강의 1 file 2011.02.10 21252
695 AutoHotKey Internet Explorer Control 2011.02.11 19663
694 AutoHotKey [COM제어] 바탕화면 바로가기 2011.02.11 5805
693 AutoHotKey autohotkey와 autohotkey_l 의 인터넷 창 띄우기 비교예제 2 2011.02.11 17775
692 AutoHotKey ahk와 ahk_l 의 웹페이지 로딩완료 체크 비교 3 2011.02.11 20325
691 AutoHotKey [ahk_l] 구글의 Gmail 자동로그인 소스 3 2011.02.11 22494
690 AutoHotKey AHK에서 가능한 COM 인터넷 익스플로러 및 GUI 브라우저 1 2011.02.11 19502
689 AutoHotKey Com_invoke to login 2011.02.11 10712
688 AutoHotKey [COM] 자바스크립트 / DOM / HTML 웹페이지 컨트롤 3 2011.02.12 27305
687 프로세스 NVSvc.exe 프로세스 삭제방법 1 2011.02.13 21653
686 프로세스 reader_sl.exe , AdobeARM.exe 프로세스 삭제방법 3 2011.02.13 32058
685 프로세스 SmartTray.exe 삭제방법 2011.02.13 15674
684 프로세스 SBoxSearchBar 프로세스 삭제방법 1 2011.02.13 15525
683 프로세스 pinomate.exe 프로세스 삭제방법 6 2011.02.13 45999
682 프로세스 EzClick.exe / ezbho.dll 프로세스 삭제방법 2 2011.02.13 18612
681 AutoHotKey IPC 메커니즘에 사용되는 각종 Windows리소스를 이용하는 authotkey( WinExec, CreateProcess, ShellExcute, ShllExcuteEx ) 2011.02.14 8920
680 AutoHotKey [ahk] 레지스터리 등록여부 확인 후 없으면 추가시키기 2 1 2011.02.14 14977
679 AutoHotKey AutoHotkey_L: Arrays, Debugger, x64, COM, #If expression 3 2011.02.14 21594
678 AutoHotKey #ifwinactive & #ifwinexist 윈도우창 마다 핫키의 용도를 다르게 사용하는 방법 2011.02.14 16528
Board Pagination Prev 1 ... 10 11 12 13 14 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소