some problems in using function CELL( )

  • Thread starter Thread starter chengj
  • Start date Start date
C

chengj

CELL(info_type, reference):
1. when I set "info_type" = "color", "reference" = c3:d4.
c3=-8(red) c4=-9(red) d3=5(black) d4=6(black)
But CELL("color", c3:d4) = 0(I think should be 1)!
2.when I set "info_type" ="parentheses", "reference" =a1:b2
a1=a2=b1=b2=5
But CELL("parentheses",a1:b2) = 0(I think should be 1)!
3.how to use "info_type" = "filename"??
I set c2 = "D:\log.txt", but CELL("filename",c3) return
blank! I don't understand . why???

Thank you very much ?
 
"color" 1 if the cell is formatted in color for negative values; otherwise
returns 0 (zero).
"parentheses" 1 if the cell is formatted with parentheses for positive or
all values; otherwise returns 0.

Reference should only refer to a single cell.

for filename, the workbook has to have been saved at least once so that it
does have a filename.

None of these parameters have anything to do with what is stored in the
referenced cell - the first two have to do with how the cell is formatted.
The second requires the workbook to have a name.
 
Tom Ogilvy said:
Reference should only refer to a single cell.
....

?

If the reference argument to CELL is a multiple cell range, CELL returns the
requested information only about the top-left cell in the first area. IOW,

CELL(whatever,SomeRange)

is always equivalent to

CELL(whatever,INDEX(SomeRange,1,1,1))

This is similar to the behavior of N and T functions.
 
Back
Top