Skip to content
Excel
2012.07.16 16:20

[excel] GET.CELL사용법

조회 수 26599 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

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

[excel] GET.CELL사용법


http://www.sulprobil.com/html/get_cell.html

You can retrieve interesting information about worksheet cells by using the Excel4 macro function GET.CELL. Define the name HasFormula with the value
=GET.CELL(48,INDIRECT("RC[-1]",FALSE))
for example. If you now insert =HasFormula next right to a cell, you will be shown whether the cell has a formula (True) or not (False).

Another example for GET.CELL you can find here.

An overview over some arguments for GET.CELL:

Proposed Name

Arg #

What =GET.CELL(Arg #,INDIRECT("RC[-1]",)) will return

AbsReference

1

Absolute style reference like [Book1.xls]Sheet1!$A$1

ShowValue

5

Cell value

ShowFormula

6

Cell formula

NumFormat

7

Number format of cell

IsLocked

14

True if cell is locked

FormulaHidden

15

True if cell formula is hidden

ShowWidth

16

Cell width. If array-entered into two cells of a row, second value is true if width is standard

ShowHeight

17

Cell height

WorkbookName

32

Workbook name like [Book1.xls]Sheet1 or Book1.xls if workbook and single sheet have identical names

ShowFormulaWOT

41

Cell formula without translation into language of workspace

HasNote

46

True if cell has a text note

HasFormula

48

True if cell contains a formula

IsArray

49

True if cell is part of an array formula

IsStringConst

52

Text alignment char ' if cell is a string constant, empty string if not

AsText

53

Cell displayed as text with numbers formatted and symbols included

WorksheetName

62

Worksheet name like [Book1.xls]Sheet1

WorkbookName

66

Workbook name like Book1.xls

IsHidden

 

VBA only: True if cell is hidden (the entire row or column, actually)

If you want to achieve similar results with VBA use this UDF:

Function sbGetCell(r As Range, s As String) As Variant
'Reverse("moc.LiborPlus.www") V0.11 PB 29-Jan-2011
Application.Volatile
Select Case s
Case "AbsReference", "1"
    'Absolute style reference like [Book1.xls]Sheet1!$A$1
    If Application.Caller.Parent.Parent.Name = r.Worksheet.Parent.Name And _
        Application.Caller.Parent.Name = r.Worksheet.Name Then
        sbGetCell = r.Address
    Else
        If InStr(r.Worksheet.Parent.Name & r.Worksheet.Name, " ") > 0 Then
            sbGetCell = "'[" & r.Worksheet.Parent.Name & "]" & r.Worksheet.Name & "'!" & r.Address
        Else
            sbGetCell = "[" & r.Worksheet.Parent.Name & "]" & r.Worksheet.Name & "!" & r.Address
        End If
    End If
Case "ShowValue", "5"
    'Cell value
    sbGetCell = r.Value
Case "ShowFormula", "6"
    'Cell formula
    sbGetCell = r.FormulaLocal
Case "NumFormat", "7"
    'Number format of cell
    sbGetCell = r.NumberFormatLocal
Case "IsLocked", "14"
    'True if cell is locked
    sbGetCell = r.Locked
Case "FormulaHidden", "15"
    'True if cell formula is hidden
    sbGetCell = r.FormulaHidden
Case "ShowWidth", "16"
    'Cell width. If array-entered into two cells of a row, second value is true if width is standard
    sbGetCell = r.ColumnWidth 'Not width!
Case "ShowHeight", "17"
    'Cell height
    sbGetCell = r.RowHeight
Case "WorkbooksheetName", "32"
    'Workbook name like [Book1.xls]Sheet1 or Book1.xls if workbook and single sheet have
    'identical names
    If r.Worksheet.Parent.Name = r.Worksheet.Name & ".xls" And _
        Application.Worksheets.Count = 1 Then
        sbGetCell = r.Worksheet.Parent.Name
    Else
        sbGetCell = "[" & r.Worksheet.Parent.Name & "]" & r.Worksheet.Name
    End If
Case "ShowFormulaWOT", "41"
    'Cell formula without translation into language of workspace
    sbGetCell = r.Formula
Case "HasNote", "46"
    'True if cell has a text note
    sbGetCell = Len(r.NoteText) > 0
Case "HasFormula", "48"
    'True if cell contains a formula
    sbGetCell = r.HasFormula
Case "IsArray", "49"
    'True if cell is part of an array formula
    sbGetCell = r.HasArray
Case "IsStringConst", "52"
    'Text alignment char "'" if cell is a string constant, empty string "" if not
    sbGetCell = r.PrefixCharacter
Case "AsText", "53"
    'Cell displayed as text with numbers formatted and symbols included
    sbGetCell = Format(r.Value, r.NumberFormatLocal)
Case "WorksheetName", "62"
    'Worksheet name like [Book1.xls]Sheet1
        sbGetCell = "[" & r.Worksheet.Parent.Name & "]" & r.Worksheet.Name
Case "WorkbookName", "66"
    'Workbook name like Book1.xls
    sbGetCell = r.Worksheet.Parent.Name
Case "IsHidden"
    'Cell hidden?
    sbGetCell = r.EntireRow.Hidden Or r.EntireColumn.Hidden
Case Else
    sbGetCell = CVErr(xlErrValue)
End Select

End Function

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

?

List of Articles
번호 분류 제목 날짜 조회 수
457 AutoHotKey IPC 메커니즘에 사용되는 각종 Windows리소스를 이용하는 authotkey( WinExec, CreateProcess, ShellExcute, ShllExcuteEx ) 2011.02.14 8918
456 Server mysql 테이블 손상시 #1146 - Table 해결방법 file 2016.07.17 8908
455 WindowsTip 지정한 IP의 포트스캔 9 file 2013.03.16 8882
454 AutoHotKey autohotkey) 화면보호기 실행 전 클릭으로 화면보호 안걸리게 하기 2012.03.15 8869
453 WindowsTip 삼성노트북 NT300E5C-A15R 드라이버 2012.11.27 8814
452 WindowsTip SVCHOST.EXE 꼭 필요한 servies.msc 항목 1 file 2013.03.20 8788
451 Server FileZilla FTP SERVER 패시브모드 셋팅방법 file 2016.12.22 8780
450 컴퓨터잡담 [Windows - 지연된 쓰기 실패] 오류메시지 복구방법 2012.11.07 8779
449 WindowsTip XP 원격데스크톱 설정과 실행 1 2013.03.11 8685
448 컴퓨터잡담 삼성 센스P30노트북 도스에서 USB 설정방법 2 file 2011.07.26 8642
447 컴퓨터잡담 안드로이드 OS 노트북에 설치하기 1 3 2011.09.03 8610
446 WindowsTip Diskless Boot Software for Windows(윈도우용 노하드 시스템) 2 file 2016.01.11 8583
445 Server php) register_globals = on 으로 설정할 수 없는경우 10 2013.03.23 8521
444 컴퓨터잡담 변종 맥중복 바이러스 증상과 대처방법 2 2011.12.14 8509
443 컴퓨터잡담 [autohotkey] 시스템 레지스트리 수정, 삭제 2010.08.14 8488
442 컴퓨터잡담 익스플로러8 액티브X(Active-X) 오류 / DEP 데이터 실행방지 프로그램 문제[Win XP] 1 file 2011.05.07 8485
441 컴퓨터잡담 [PHP] 오류출력 안하기 2011.05.04 8425
440 컴퓨터잡담 SK브로드밴드 윈도우7 또는 Vista 속도이상시 환경설정방법 2011.06.20 8374
439 Excel 엑셀) 배열 2 2012.02.23 8353
438 컴퓨터잡담 [엑셀함수] 조건결과가 참일경우만 정상 출력하기 3 2010.08.11 8348
Board Pagination Prev 1 ... 22 23 24 25 26 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소