메인 컨텐츠로 가기

Excel에서 텍스트 문자열을 수식으로 변환하는 방법은 무엇입니까?

이러한 텍스트 문자열을 실제 수식으로 변환하고 워크 시트에서 해당 값을 계산해야하는 = A1 + B1 형식으로 많은 텍스트 문자열이있는 경우 안타깝게도 Excel에서 문제를 해결할 직접적인 방법은 없습니다. 하지만 여기서 흥미로운 트릭에 대해 이야기 할 수 있습니다.

사용자 정의 함수를 사용하여 텍스트 문자열을 수식으로 변환

Excel 용 Kutools를 사용하여 텍스트 문자열을 수식으로 변환


화살표 블루 오른쪽 거품 사용자 정의 함수를 사용하여 텍스트 문자열을 수식으로 변환

다음 짧은 VBA 코드는 다음 단계에 따라 텍스트를 수식으로 변환하는 문제를 처리하는 데 도움이 될 수 있습니다.

1. 누르고 ALT + F11 키가 열립니다. Microsoft Visual Basic for Applications 창.

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

VBA 코드 : 텍스트 문자열을 수식으로 변환

Function Eval(Ref As String)
Application.Volatile
Eval = Evaluate(Ref)
End Function

3. 이 코드를 저장하고 워크 시트로 돌아가서 다음 공식을 입력하십시오. = 평가 (C1) 빈 셀 (C1 수식으로 변환하려는 텍스트 문자열 셀이 포함되어 있음), 스크린 샷 참조 :

doc-convert-text-to-formula1

4. 그런 다음 엔터 버튼 키를 누르고 D1 셀을 선택하고 채우기 핸들을이 수식을 적용 할 범위로 끕니다. 스크린 샷보기 :

doc-convert-text-to-formula1


화살표 블루 오른쪽 거품 Excel 용 Kutools를 사용하여 텍스트 문자열을 수식으로 변환

위 코드 사용이 마음에 들지 않으면 신청할 수 있습니다. Excel 용 Kutools텍스트를 수식으로 변환 기능을 사용하면 텍스트 문자열을 한 번에 수식으로 변환 할 수도 있습니다.

Excel 용 Kutools 300 개 이상의 편리한 Excel 도구가 포함되어 있습니다. 30 일 동안 제한없이 무료로 사용해보세요. 그것을 지금.

Excel 용 Kutools를 설치 한 후 다음과 같이하십시오.

1. 변환 할 텍스트 문자열을 선택하십시오.

2. 딸깍 하는 소리 쿠툴 > 콘텐츠 변환기 > 텍스트를 수식으로 변환, 스크린 샷 참조 :

doc-convert-text-to-formula1

3. 그리고 선택한 모든 텍스트 문자열이 실제 수식으로 변환되어 값도 가져옵니다. 스크린 샷보기 :

doc-convert-text-to-formula4 -2 doc-convert-text-to-formula5

이 텍스트를 수식으로 변환 기능에 대해 자세히 알아보십시오.


관련 기사 :

Excel에서 수식을 텍스트 문자열로 변환하는 방법은 무엇입니까?

최고의 사무 생산성 도구

🤖 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 (16)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I am finding this to be not working properly. As everyone else has said (and I could not see a satisfactory solution), it does not work when trying to pull in stuff from other worksheets in the same workbook. It's frustrating and I am having to give up on this and find another solution. So the Google search continues!
This comment was minimized by the moderator on the site
Thank you very much!!! GREAT IDEA!!!
This comment was minimized by the moderator on the site
Hello
For the first defined function way, I have a problem.
when the resources for concatenate function are in another worksheet, Eval function works properly when that resource worksheet is open, But immediately when I close that resource worksheet, Eval function Not working. How I can change the codes for eval function to use closed resource worksheets?
This comment was minimized by the moderator on the site
Hello Johnny
about Hussein’s issue, if the external workbook is closed INDIRECT gives #REF! error. Do you have other solution?
This comment was minimized by the moderator on the site
use indirect only works with open workbooks.


solution is to use indirect.ext from morefunc.


regards,
Hasan nasralla
This comment was minimized by the moderator on the site
Hi Hussein,

Just use the INDIRECT function in Excel. Does the same thing.
This comment was minimized by the moderator on the site
Greetings, the above code works perfectly inside the same workbook across different sheets, but in case i have a cell reference to an external workbook it returns #VALUE!. the formulas were calculating normally earlier.
Example for the formula can't be evaluated correctly: IFERROR(INDEX('[Tracking-OSP Outside Riyadh-07-09-2017.xlsx]Tracking WO'!$U$3:$U$19000,MATCH(A3&"",'[Tracking-OSP Outside Riyadh-07-09-2017.xlsx]Tracking WO'!$B$3:$B$19000,0)),INDEX('[Tracking-OSP Outside Riyadh-07-09-2017.xlsx]Tracking WO'!$U$3:$U$19000,MATCH(value(A3),'[Tracking-OSP Outside Riyadh-07-09-2017.xlsx]Tracking WO'!$B$3:$B$19000,0))).
This comment was minimized by the moderator on the site
The replace = with = works, so relieved. Thank you to whoever discovered and shared this nugget of Excel gold.
This comment was minimized by the moderator on the site
To clarify my other comment, I mass replaced the "=" character with the same "=" character, and that made the strings turn into formulas.
This comment was minimized by the moderator on the site
Hi Rich,
I'm just reading you comment on turning text into a formula. It seems that the function as mentioned above is not working. I'm not really a programmer but what i did is converting a formula into a text and in the text i have to replace a few values and combine it again in one text but now i need to convert it back into a formula. Could you give me a tip.
Regards
Frans
This comment was minimized by the moderator on the site
I don't know if this would always work, but I had a number of cells that had formulas stored as text strings. I did a full worksheet find replace on the "=" character, and all of my strings converted to formulas with that one action.
This comment was minimized by the moderator on the site
Thank you. Works well with the user defined function... I could do what I could not using the default functions of INDIRECT, ADDRESS et al provided. It fell short when I had a range to be input.
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