+ Reply to Thread
Results 1 to 8 of 8

What does SpecialCells(2) mean?

  1. #1
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    What does SpecialCells(2) mean?

    I see some people use “SpecialCells(2)” in their code. Although I do not know what it means, I can guess it may be another way of referring to the type special you find in CTRL plus G in excel. The number may refer to either of these. XlFormula, Xlnumber, Xlconstants and etc.

    If my guess is correct, how do I know what the numbers in bracket (1), (2) refer to. For e.g. what is SpecialCells(1)mean? I am unable to find these in excel helpline. Please help!

  2. #2
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: What does SpecialCells(2) mean?

    Your guess is correct. The answer to your question - look in the Help.
    Here it is:

    Excel Developer Reference
    XlCellType Enumeration
    Specifies the type of cells.
    Name Value Description
    xlCellTypeAllFormatConditions -4172 Cells of any format.
    xlCellTypeAllValidation -4174 Cells having validation criteria.
    xlCellTypeBlanks 4 Empty cells.
    xlCellTypeComments -4144 Cells containing notes.
    xlCellTypeConstants 2 Cells containing constants.
    xlCellTypeFormulas -4123 Cells containing formulas.
    xlCellTypeLastCell 11 The last cell in the used range.
    xlCellTypeSameFormatConditions -4173 Cells having the same format.
    xlCellTypeSameValidation -4175 Cells having the same validation criteria.
    xlCellTypeVisible 12 All visible cells.
    If you are pleased with a member's answer then use the Star icon to rate it.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: What does SpecialCells(2) mean?

    Buran, You are the rising star of this forum and will give you the top star.

    For some unknow reason, I am unable to find the help function in 2010. In excel 2007, whilst I am in VB page, I can press the F1 and go to the developer page, but if I do the same in excel 2010, I get a different page. I am sure, I am missing something. In excel 2007, I also used to highlight any varaible and hit the F1 button, so I do not know and where to find the helpline in excel 2010.

  4. #4
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: What does SpecialCells(2) mean?

    Thanks for the kind words :-).
    I don't know why you get different help page. I just tried on Excel 2010 and I get the same page. I put the cursor on SpecialCells and hit F1. Maybe you should use F2 and browse to find the Range.SpceialCells property.

    Buran

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: What does SpecialCells(2) mean?

    Yes, the F2 works. Where are the star icons?

  6. #6
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: What does SpecialCells(2) mean?

    Down left corner of every user's post, star and triangle. thanks :-)
    F1 should work also if you put the cursor in the code...

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: What does SpecialCells(2) mean?

    I am sure I am missing something. While I am at VBA page, highlighted the word SpecialCells and hit the F1 key, now all I can see is excel help and Categories. Even if I type the word SpecialCells on the excel help page, I get three serach topics on SpecialCells. In excel 2007, If type the same word, I get many pages on the same topic.

  8. #8
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: What does SpecialCells(2) mean?

    In my case in both 2007 and 2010 SpecialCells topic opens immediately

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1