some problems in using function CELL( )

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 ?
 
T

Tom Ogilvy

"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.
 
H

Harlan Grove

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Need help calculating probabilities 7
VBA Coding Help for Beginner 0
If Condition 4
Sumproduct in matrix means 3
Hyperlinks with lookups 0
conditonal formatting 3
Timesheet formula problem 3
Strange Function Copy 1

Top