Leading the way in Microsoft Office Development
 Home|Excel|Word|PowerPoint|Consultancy|Feedback|Contact 
 Microsoft Excel > Functions > Lookup and Reference > COLUMNS

 

COLUMNS(array)

 
 Returns the number of columns in a cell range or reference.

 arrayThe array or array formula containing the number of columns.

 REMARKS
 
  • If "array" is not a cell range or an array of values, the #VALUE! is returned.

     EXAMPLES
     
     ABC
    1=COLUMNS(B1:B2) = 11020
    2=COLUMNS(B1:C2) = 22010
    3=COLUMNS({1,2,3;4,5,6}) = 3  
    4=COLUMNS({1,2,3,"some text"}) = 4  
    5=COLUMNS("some text") = #VALUE!  
     

     Functions - C | Index - C | Office Online 

     Copyright © 2004-2007 Better Solutions Limited. All Rights Reserved.Top