Text in a calculation

ExcelRoy

Well-known Member
Joined
Oct 2, 2006
Messages
2,540
Office Version
  1. 365
Platform
  1. Windows
Hi,

is there a way to ignore text in a formula

=IF(F22="","",SUM(G22-H22))

G22 on this formula is set to "Not Set" as there is no number to calculate

Could the calculation be "tricked" into thinking it actually is a 0 and therefore calculate as required?

Many Thanks
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
=IF(F22="","",SUM(G22:H22)) change the- to : and see if you still get an error
 
Upvote 0
So if G22 is "Not Set"
You would want G22 to be treated as Zero, therefor 0-H22
So if H22 was say 10, you'd get -10

Is that what you want?

Could there be text in either cell, G22 or H22 ?
Should the same effect occur for both cells?
 
Upvote 0
sorry I thought it was a range are you trying to subtract one cell from the other.
 
Upvote 0
No worries Drrellik,

Yes Jonmo spot on

Only text may be in G22 never in H22

Thanks
 
Upvote 0
I am trying to build a weekly time sheet with in and out times, as well as "vacation" and "off" text in the cells, but when I sum everything up, I get a value error. Is there a way to use a function in addition to the sum function to tell excel the text is either zero or a number?
 
Upvote 0
JDubbs,

you might want to start a new thread rather than post here, on an older thread that has nothing to do with what you are asking about. it wont get seen by the whole forum. and I am sorry I can't move it for you.
 
Upvote 0

Forum statistics

Threads
1,216,299
Messages
6,129,969
Members
449,545
Latest member
SURY

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top