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

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

?

  1. 30
    Oct 2013
    17:04

    ahk) autohotkey 엑셀(Excel)에서 행값 증가시키기

    CategoryAutoHotKey Views37415
    Read More
  2. 09
    Jun 2013
    12:13

    Excel) 엑셀에서 셀 입력시 자동 추가글 넣기

    CategoryExcel Views24062
    Read More
  3. 17
    Sep 2012
    08:21

    현재 Excel 파일 이름을 셀에 삽입

    CategoryExcel Views24559
    Read More
  4. 16
    Jul 2012
    16:20

    [excel] GET.CELL사용법

    CategoryExcel Views26599
    Read More
  5. 30
    Jun 2012
    08:14

    PDF, EXCEL 파일 변환

    CategoryExcel Views19809
    Read More
  6. 13
    Feb 2012
    13:33

    MS Office 2007 Excel 최근 문서 목록 삭제하기

    CategoryExcel Views22229
    Read More
  7. 05
    Jan 2012
    07:01

    Excel Vba) 현재 셀에서 한줄내림 (activecell.offset(1,0).Select)

    CategoryExcel Views31019
    Read More
  8. 05
    Jan 2012
    07:00

    Excel Vba) 셀의 행, 열(column, row) 주소 알아내기 또는 삽입하기 더불어 제어하기

    CategoryExcel Views42974
    Read More
  9. 21
    Dec 2011
    14:36

    Excel) 엑셀 콤보박스 대화상자 목록지정하기

    CategoryExcel Views29390
    Read More
  10. 25
    Nov 2011
    13:03

    Excel VBA) 파일 이름에 따라 이미지 출력

    Category컴퓨터잡담 Views16207
    Read More
  11. 25
    Oct 2011
    19:49

    Excel VBA) 선택값에 따라 결과값 전달하기 CASE문

    Category컴퓨터잡담 Views14771
    Read More
  12. 24
    Oct 2011
    19:01

    Excel VBA (1): 셀 선택 및 변수 및 비활성시트 컨트롤하기

    Category컴퓨터잡담 Views25000
    Read More
  13. 23
    Oct 2011
    12:59

    Excel VBA) DAO를 이용하여 엑셀문서 열지않고 데이타 가져오기

    Category컴퓨터잡담 Views18271
    Read More
  14. 23
    Oct 2011
    08:20

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

    Category컴퓨터잡담 Views16349
    Read More
  15. 23
    Oct 2011
    07:51

    Excel VBA)OpenDatabase 방법 [Excel 2003의 VBA 언어 참조]

    Category컴퓨터잡담 Views13884
    Read More
  16. 23
    Oct 2011
    06:07

    eXCEL VBA)엑셀파일 열지않고 내용 불러오기

    Category컴퓨터잡담 Views30517
    Read More
  17. 17
    Oct 2011
    19:07

    Excel VBA) 자주쓰는 함수모음

    Category컴퓨터잡담 Views21676
    Read More
  18. 14
    Oct 2011
    18:29

    Excel VBA) 엑셀 데이터 범위 찾아내기

    Category컴퓨터잡담 Views15265
    Read More
  19. 14
    Oct 2011
    13:54

    Excel VBA) 원하는 범위 지정한 뒤 복사하여 붙여넣기

    Category컴퓨터잡담 Views29385
    Read More
  20. 28
    Sep 2011
    18:48

    Excel VBA) 자료모으기

    Category컴퓨터잡담 Views11903
    Read More
Board Pagination Prev 1 2 Next
/ 2

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소