ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   assigning a value to a cell (https://www.excelbanter.com/excel-worksheet-functions/109650-assigning-value-cell.html)

Braheem

assigning a value to a cell
 
Ok here is my senario:

I have a student roster with NAMES, NUMBERS, CODES, ETC. I would like to
assign the number 1 to each cell in the NAME column that has any type of text
in the cell. If there is no text then I would like to assign the number 0.

Exmpl:

Column A Column B

Joe Schmo 1
Tina Turner 1
George W. 1
"No Text" 0
Shizam 1
"No Text" 0
Balthazar 1

Total = SUM(B1:B7)

tim m

assigning a value to a cell
 
=IF(ISTEXT(A1),1,0)

see if this does the trick.

"Braheem" wrote:

Ok here is my senario:

I have a student roster with NAMES, NUMBERS, CODES, ETC. I would like to
assign the number 1 to each cell in the NAME column that has any type of text
in the cell. If there is no text then I would like to assign the number 0.

Exmpl:

Column A Column B

Joe Schmo 1
Tina Turner 1
George W. 1
"No Text" 0
Shizam 1
"No Text" 0
Balthazar 1

Total = SUM(B1:B7)


RagDyeR

assigning a value to a cell
 
Why not eliminate the "middle man", and just count the contents of the
column?

Try either of these:

=COUNTA(A1:A10)

=COUNTIF(A1:A10,"*?")

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Braheem" wrote in message
...
Ok here is my senario:

I have a student roster with NAMES, NUMBERS, CODES, ETC. I would like to
assign the number 1 to each cell in the NAME column that has any type of
text
in the cell. If there is no text then I would like to assign the number 0.

Exmpl:

Column A Column B

Joe Schmo 1
Tina Turner 1
George W. 1
"No Text" 0
Shizam 1
"No Text" 0
Balthazar 1

Total = SUM(B1:B7)



Baraki0568

assigning a value to a cell
 
=if(<column A cell="",0,1)
or
=if(ISBLANK(<column A cell),0,1)

see which one works better for you.

"Braheem" wrote:

Ok here is my senario:

I have a student roster with NAMES, NUMBERS, CODES, ETC. I would like to
assign the number 1 to each cell in the NAME column that has any type of text
in the cell. If there is no text then I would like to assign the number 0.

Exmpl:

Column A Column B

Joe Schmo 1
Tina Turner 1
George W. 1
"No Text" 0
Shizam 1
"No Text" 0
Balthazar 1

Total = SUM(B1:B7)



All times are GMT +1. The time now is 10:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com