Showing posts with label Column. Show all posts
Showing posts with label Column. Show all posts

Friday, October 21, 2011

Know your Cell

suppose your data in cell  "D3"


The cell address of your cell                                                 =CELL("address",D3)


The column number of your cell                                           =CELL("col",D3)


The row number of your cell                                                =CELL("row",D3)


The actual contents of the cell                                              =CELL("contents",D3)


The type of entry in the cell.                                                =CELL("type",D3)
Shown as b for blank, l for text, v for value.


The alignment of the cell.                                                    =CELL("prefix",D3)
Shown as ' for left, ^ for centre, " for right.
Nothing is shown for numeric entries.


The width of the cell.                                                            =CELL("width",D3)


The number format fo the cell.                                            =CELL("format",D3)  
(See the table shown below)



Formatted for braces ( ) on positive values.                      =CELL("parentheses",D3)
1 for yes, 0 for no.


Formatted for coloured negatives.                                     =CELL("color",D3)
1 for yes, 0 for no.


The type of cell protection.                                                =CELL("protect",D3)
1 for a locked, 0 for unlocked.

The filename containing the cell.                                      =CELL("filename",D3)

Friday, October 14, 2011

Get Last Column Number

if you want to get last column number thn use this code ...

LastColumnNumber=Range("A1").end(xlToRight).Column