Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I convert text to numbers in excel?

I have a work schedule that shows "D" for working days, and "N" for working
nights. At the end of the month, there is a cell that shows "Total
Days/Nights Worked" for that particular month. How do create a formula that
says, "If there is a "D" or a "N" in these particular cells, then show a
value of "1" for each, and add them up. In other words, if you worked 6 days
and 9 nights for the month of January, I'd like for the total to show 15.
Thanks a million to anyone who can help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How do I convert text to numbers in excel?

Hi there

Number of nights can be determined by =COUNTIF(A1:A10,"N")
Number of days by =COUNTIF(A1:A10,"D")
thus the total is =COUNTIF(A1:A10,"N")+COUNTIF(A1:A10,"D")

"JSM52272" wrote:

I have a work schedule that shows "D" for working days, and "N" for working
nights. At the end of the month, there is a cell that shows "Total
Days/Nights Worked" for that particular month. How do create a formula that
says, "If there is a "D" or a "N" in these particular cells, then show a
value of "1" for each, and add them up. In other words, if you worked 6 days
and 9 nights for the month of January, I'd like for the total to show 15.
Thanks a million to anyone who can help.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default How do I convert text to numbers in excel?

=COUNTIF(A:A,"D")

etc.

or together

=SUM(COUNTIF(A:A,{"D","N"}))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"JSM52272" wrote in message
...
I have a work schedule that shows "D" for working days, and "N" for

working
nights. At the end of the month, there is a cell that shows "Total
Days/Nights Worked" for that particular month. How do create a formula

that
says, "If there is a "D" or a "N" in these particular cells, then show a
value of "1" for each, and add them up. In other words, if you worked 6

days
and 9 nights for the month of January, I'd like for the total to show 15.
Thanks a million to anyone who can help.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I convert numbers to text in Excel? AL-B Excel Worksheet Functions 4 January 31st 07 04:52 PM
How do I convert text to numbers in an old version of excel pdr Excel Worksheet Functions 2 January 31st 06 09:49 PM
Convert numbers stored as text to numbers Excel 2000 Darlene Excel Discussion (Misc queries) 6 January 31st 06 08:04 PM
How to convert Excel imported numbers from text to numbers? Alden Excel Discussion (Misc queries) 9 April 1st 05 09:51 PM
I want to convert numbers to text in Excel Hannibal Excel Discussion (Misc queries) 2 February 28th 05 03:13 PM


All times are GMT +1. The time now is 09:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"