ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can I get text to equal a numerical value in Excel? (https://www.excelbanter.com/excel-discussion-misc-queries/4405-how-can-i-get-text-equal-numerical-value-excel.html)

Mighty Mike

How can I get text to equal a numerical value in Excel?
 
I am developing a scheduling program for my workplace. The program will
automatically calculate total time scheduled based on times entered (i.e.,
8:00AM start time in one cell, 5:00PM end time in the next cell calculates to
9 hours in a third cell). However, we need to indicate days off, vacations
and leaves of absences. When we enter text into the first cell, it obviously
destroys the calculation in the third cell. I need to be able to have Excel
assign a value of "0" for any cell that has text. Thanks, Mike

Kevin

Mike,
I fixed similar problems in my files by using the if & iserror
functions. For example, if(iserror(a1+b1),0,a1+b1).

I may not have the exact formatting for the iserror portion but it
should be close.


Mighty Mike

Thank you, Kevin!

"Kevin" wrote:

Mike,
I fixed similar problems in my files by using the if & iserror
functions. For example, if(iserror(a1+b1),0,a1+b1).

I may not have the exact formatting for the iserror portion but it
should be close.




All times are GMT +1. The time now is 03:08 PM.

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