Vlookup result changing after adding iferror

lizmorton1990

New Member
Joined
Aug 19, 2020
Messages
16
Office Version
  1. 2013
Platform
  1. Windows
Hi,

I am trying to do a vlookup and I want to add an iferror in if the vlookup doesn't find anything so it looks at another cell. So far I started with this:

=vlookup(C11194,Hours!A:AC,29,0)

Which returned 08:00 to mean 8 hours of training but when that returns an error as the data doesn't exist, I want to add an iferror to the vlookup so when it says #n/a it looks at another cells on the same tab the vlookup is on i.e

=iferror(vlookup(C11194,Hours!A:AC,29,0),M11194)

But when I do it now returns 0.3333333333 which is incorrect as it should return 08:00 in this example. For the rows that return #n/a it returns the value correctly in column M

What am I doing wrong? I have tried formatting the column to auto and plain text and it doesn't help.
 
It's a duration format as opposed to a time format and allows the hours portion to exceed 24.
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,223,927
Messages
6,175,438
Members
452,641
Latest member
Arcaila

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