If conditions having #VALUE

Harold Garcia

Board Regular
Joined
Jan 2, 2014
Messages
72
¦ 8:34 ¦

<colgroup><col width="89"></colgroup><tbody>
</tbody>
8:34 AM

<colgroup><col width="103"></colgroup><tbody>
</tbody>
¦18:46 ¦
6:46 PM

<colgroup><col width="103"></colgroup><tbody>
</tbody>
¦ ¦
#VALUE!

<colgroup><col width="103"></colgroup><tbody>
</tbody>
____________
#VALUE!

<colgroup><col width="103"></colgroup><tbody>
</tbody>
Day-Off ¦

<colgroup><col width="103"></colgroup><tbody>
</tbody>
#VALUE!

<colgroup><col width="103"></colgroup><tbody>
</tbody>

<tbody>
</tbody>

this is the original formula
=TIMEVALUE(SUBSTITUTE(A1,"¦",""))

Problem is when i drag the data it put #VALUE...
I need to return the Day-Off ¦ as D-Off
and the no data as blank...
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
You can use IFERROR()

e.g

=IFERROR(TIMEVALUE(SUBSTITUTE(A1,"¦","")),"")
 

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
Try:

=IFERROR(IF(ISNUMBER(SEARCH("Day-off",A1)),"D-off",TIMEVALUE(SUBSTITUTE(A1,"¦",""))),"")
 

Harold Garcia

Board Regular
Joined
Jan 2, 2014
Messages
72

ADVERTISEMENT

Can i add several condition?

Like FL, SL etc...
 

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
You can create a little table somewhere with the search criteria (e.g Day-off) and the corresponding returns (e.g D-off) ...

then try:

=IFERROR(VLOOKUP(TRIM(SUBSTITUTE(A1,"¦","")),$X$1:$Y$10,2,0),IFERROR(TIMEVALUE(SUBSTITUTE(A1,"¦","")),""))

where X1:Y10 contains your lookup table.
 

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
I have contributed to your thread with a basic start based on the above.
 

Forum statistics

Threads
1,137,063
Messages
5,679,401
Members
419,825
Latest member
MegastarMagus

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
Top