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
번호 분류 제목 날짜 조회 수
597 컴퓨터잡담 SendMessage the values are for wparam 1 2009.12.23 8204
596 Server Server 성능 테스트 secret 2016.11.30 585
595 컴퓨터잡담 Sitemap.xml 만들어 주는 사이트 file 2016.01.23 691
594 컴퓨터잡담 SK브로드밴드 윈도우7 또는 Vista 속도이상시 환경설정방법 2011.06.20 8374
593 프로세스 SmartTray.exe 삭제방법 2011.02.13 15674
592 프로세스 smas.exe 프로세스 내용 및 삭제 1 2011.02.06 13305
591 프로세스 Spoo1sv.exe 바이러스 치료하기 1 12 2011.11.28 19179
590 컴퓨터잡담 Spy & Capture Spy++과 같은 계열의 프로그램 1 2009.12.10 17416
589 컴퓨터잡담 SVCHOST 바이러스 제거하기 2 2012.12.24 6410
588 컴퓨터잡담 svchost.exe cpu,memory 점유 문제 해결 4 2011.01.26 6477
587 WindowsTip SVCHOST.EXE 꼭 필요한 servies.msc 항목 1 file 2013.03.20 8788
586 컴퓨터잡담 svchost.exe 프로세스로 내컴퓨터 최적화 시키기 2010.04.14 7366
585 WindowsTip SysFader: iexplore.exe - 응용 프로그램 오류 해결방법 1 file 2013.02.23 12360
584 컴퓨터잡담 Table_open_cache 가 늘어나지 않는 이유. 1 3 2010.04.27 15544
583 컴퓨터잡담 tasklist /SVC svchost 시스템 서비스 프로세스 보기 2010.01.21 8117
582 컴퓨터잡담 TCP View로 네트워크 트래픽 유발 프로그램 찾아내기 file 2012.10.18 6062
581 WindowsTip TCP/IP Network Communication without extra Tools(DB, 메신저 등등) 2012.07.03 6773
580 컴퓨터잡담 TCP/IP Winsock 복원방법(초기화) 2 file 2012.05.23 9719
579 컴퓨터잡담 TCPDUMP 사용방법 / TCP 자세히 보기 1 4 2010.03.17 18042
578 컴퓨터잡담 TIME_WAIT 줄이기(소켓이 부족하여 프로세스 강제중단을 막기위해) 4 2009.11.30 34111
Board Pagination Prev 1 ... 15 16 17 18 19 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소