Office 2003 Formula equivalent for IFERROR

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,601
Office Version
  1. 2021
Platform
  1. Windows
I am using office 2007 & my assistant has 2003. I set up the following formula in 2007 which is working fine in Office 2007, but gives me a # value! when loading this on Office 2003

It would be appreciated if someone could supply me with the equivalent formula that will work and give me the desired result in Office 2003

=IFERROR(VALUE(RIGHT(K2,1)&LEFT(K2,FIND("-",K2)-1)),VALUE(K2))
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
=if(iserror(value(right(k2,1)&left(k2,find("-",k2)-1)),value(k2),value(right(k2,1)&left(k2,find("-",k2)-1)))
 
Upvote 0
Try
=if(iserror(value(right(k2,1)&left(k2,find("-",k2)-1))),value(k2),value(right(k2,1)&left(k2,find("-",k2)-1)))
 
Upvote 0
What is in K2, can you post a few samples?

In 2003 and prior, you might try to test for what causes the error, not the error itself..

My guess would be the error is caused when K2 does not contain a -
If that's the case, try

=IF(ISERROR(FIND("-",K2)),VALUE(K2),VALUE(RIGHT(K2,1)&LEFT(K2,FIND("-",K2)-1)))

This way you don't have to test the entire formula (extra calcs).
You only have to test the Find part.


Hope that helps.
 
Upvote 0
The formula supplied by Yahya is correct.

=if(iserror(value(right(k2,1)&left(k2,find("-",k2)-1))),value(k2),value(right(k2,1)&left(k2,find("-",k2)-1)))

It would be appreciated if you would assist me by supplying the code for the formula in VBA format
 
Upvote 0
It would be appreciated if you would assist me by supplying the code for the formula in VBA format

Turn on the macro recorder, select the cell, hit F2, and Enter.
Stop the macro recorder and inspect the code.
 
Upvote 0
Thanks for the help, much appreciated

I learnt something new regarding the macro recording i.ro. getting the recorder to record a formula
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

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