메인 컨텐츠로 가기

모든 워크 시트를 값으로 만 저장하는 방법은 무엇입니까?

여러 수식이 포함 된 통합 문서가있는 경우 이제이 파일을 다른 사용자에게 배포해야합니다. 수식을 표시하지 않고 값만 표시합니다. 일반적으로 데이터를 값으로 만 복사하여 붙여 넣어 워크 시트를 값으로 빠르게 저장할 수 있습니다. 그러나 어떻게 모든 워크 시트를 하나씩 복사하여 붙여 넣지 않고 값으로 만 저장할 수 있습니까?

VBA 코드로만 모든 워크 시트를 값으로 저장


화살표 블루 오른쪽 거품 VBA 코드로만 모든 워크 시트를 값으로 저장

다음 VBA 코드를 사용하면 모든 시트를 수식없이 값으로 빠르게 저장하고 모든 셀 서식을 유지할 수 있습니다. 다음과 같이하십시오 :

1. 누르고 ALT + F11 키를 눌러 응용 프로그램 용 Microsoft Visual Basic 창.

2. 딸깍 하는 소리 끼워 넣다 > 모듈을 클릭하고 다음 코드를 모듈 창문.

VBA 코드 : 모든 워크 시트를 값으로 만 저장합니다.

Sub Saveasvalue()
'Updateby Extendoffice
    Dim wsh As Worksheet
    For Each wsh In ThisWorkbook.Worksheets
        wsh.Cells.Copy
        wsh.Cells.PasteSpecial xlPasteValues
    Next
    Application.CutCopyMode = False
End Sub

3. 그런 다음 F5 이 코드를 실행하려면 전체 통합 문서가 값으로 만 저장되었으며 모든 수식은 한 번에 제거되었으며 값은 셀 서식으로 유지됩니다.

주의 사항: 코드를 적용하기 전에 먼저 통합 문서의 사본을 저장할 수 있습니다.

최고의 사무 생산성 도구

🤖 Kutools AI 보좌관: 다음을 기반으로 데이터 분석을 혁신합니다. 지능형 실행   |  코드 생성  |  사용자 정의 수식 만들기  |  데이터 분석 및 차트 생성  |  Kutools 기능 호출...
인기 기능: 중복 항목 찾기, 강조 표시 또는 식별   |  빈 행 삭제   |  데이터 손실 없이 열이나 셀 결합   |   수식없이 반올림 ...
슈퍼 조회: 다중 기준 VLookup    다중 값 VLookup  |   여러 시트에 걸친 VLookup   |   퍼지 조회 ....
고급 드롭다운 목록: 드롭다운 목록을 빠르게 생성   |  종속 드롭다운 목록   |  다중 선택 드롭 다운 목록 ....
열 관리자: 특정 개수의 열 추가  |  열 이동  |  Toggle 숨겨진 열의 가시성 상태  |  범위 및 열 비교 ...
특색 지어진 특징: 그리드 포커스   |  디자인보기   |   큰 수식 바    통합 문서 및 시트 관리자   |  리소스 라이브러리 (자동 텍스트)   |  날짜 선택기   |  워크 시트 결합   |  셀 암호화/해독    목록으로 이메일 보내기   |  슈퍼 필터   |   특수 필터 (굵게/기울임꼴/취소선 필터링...) ...
상위 15개 도구 세트12 본문 도구 (텍스트 추가, 문자 제거,...)   |   50+ 거래차트 유형 (Gantt 차트,...)   |   40+ 실용 방식 (생일을 기준으로 나이 계산,...)   |   19 삽입 도구 (QR 코드 삽입, 경로에서 그림 삽입,...)   |   12 매출 상승 도구 (숫자를 단어로, 환율,...)   |   7 병합 및 분할 도구 (고급 결합 행, 셀 분할,...)   |   ... 그리고 더

Excel용 Kutools로 Excel 기술을 강화하고 이전과는 전혀 다른 효율성을 경험해 보세요. Excel용 Kutools는 생산성을 높이고 시간을 절약하기 위해 300개 이상의 고급 기능을 제공합니다.  가장 필요한 기능을 얻으려면 여기를 클릭하십시오...

상품 설명


Office Tab은 Office에 탭 인터페이스를 제공하여 작업을 훨씬 쉽게 만듭니다.

  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
Comments (18)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
thanks for help
This comment was minimized by the moderator on the site
sämst shjkjhgasghjdfsjhkfdgsdjhgafgb,ja u fdsvjkhgfkjahfg ka khdfzhjkg
This comment was minimized by the moderator on the site
Hi,
This is what i'm using (I exit the file automatically so I won't save accidently with values only).

But I wanted to keep just one sheet saved "normally" because I have a drop down list there that I would not like to lose when sharing the file.


Can anyone help me do this?

Thank you!


<div data-tag="code">Sub Saveasvalue()

Dim wsh As Worksheet
For Each wsh In ThisWorkbook.Worksheets
wsh.Cells.Copy
wsh.Cells.PasteSpecial xlPasteValues
Next
Application.CutCopyMode = False

savename = Application.GetSaveAsFilename(fileFilter:="Exel Files (*.xlsx), *.xlsx")
ActiveWorkbook.SaveAs Filename:=savename, FileFormat:=51

Application.DisplayAlerts = False 'exit without alerts
Application.Quit
End Sub
This comment was minimized by the moderator on the site
It runs good but i need a VBA of paste as value for a bunch of excels workbooks.



This comment was minimized by the moderator on the site
Is there any way to undo this if you've forgotten to save down the formula version first?
This comment was minimized by the moderator on the site
I need to publish Excel based financial statements with groupings. This worked to clear all the formulae and leave just the numbers. Other methods I tried cleared the groupings.
This comment was minimized by the moderator on the site
Good! Excellent! I need this but no any sheets
This comment was minimized by the moderator on the site
Remove all filters/protection in all the sheets. should work perfectly.
This comment was minimized by the moderator on the site
Tengo ese código, si bien es cierto funciona pero quisiera que no considere algunas hojas de mi archivo excel. se puede ?
Saludos.
This comment was minimized by the moderator on the site
Funcionou!! Muito Bom!!!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations