Need help with formula

DKRbella0814

Board Regular
Joined
Aug 10, 2008
Messages
155
Can someone help me identify the error in this formula; I may have missed a parenthesis someplace. Thanks in advance for your help.

=IF(AND(ISBLANK(VLOOKUP(A2,Data!B2:DU2,13,FALSE)),(VLOOKUP(A2,Data!B2:DU2,14,FALSE)<>"")),(VLOOKUP(A2,Data!B2:DU2,14,FALSE)/60),IF(AND((VLOOKUP(A2,Data!B2:DU2,13,FALSE)<>""),(VLOOKUP(A2,Data!B2:DU2,14,FALSE)<>"")),((VLOOKUP(A2,Data!B2:DU2,13,FALSE)*60)+VLOOKUP(A2,Data!B2:DU2,14,FALSE))/60),if(and((isblank(VLOOKUP(A2,Data!B2:DU2,13,FALSE))),(isblank(VLOOKUP(A2,Data!B2:DU2,14,FALSE)))),"",(VLOOKUP(A2,Data!B2:DU2,13,FALSE))
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I don't think your entire code posted (it abruptly ends). If you have any > or < in the formula, put a space before and after.

Also, please explain what you want the formula to do. Trying to debug a formula that incredibly wordy without knowing the purpose is almost impossible, as there could be more underlying problems.
 
Upvote 0
Does this do it?

=IF(AND(ISBLANK(VLOOKUP(A2,Data!B2:DU2,13,FALSE)),VLOOKUP(A2,Data!B2:DU2,14,FALSE)<>""),VLOOKUP(A2,Data!B2:DU2,14,FALSE)/60,IF(AND(VLOOKUP(A2,Data!B2:DU2,13,FALSE)<>"",VLOOKUP(A2,Data!B2:DU2,14,FALSE)<>""),(VLOOKUP(A2,Data!B2:DU2,13,FALSE)*60+VLOOKUP(A2,Data!B2:DU2,14,FALSE))/60,IF(AND(ISBLANK(VLOOKUP(A2,Data!B2:DU2,13,FALSE)),ISBLANK(VLOOKUP(A2,Data!B2:DU2,14,FALSE))),"",VLOOKUP(A2,Data!B2:DU2,13,FALSE))))
 
Upvote 0
If the s/u time (min) is blank AND the s/u time (hrs) is not blank, then return the s/u time in hrs and divide by 60 - to convert to hrs

If the s/u time (min) is not blank and s/u time in (hrs) is not blank, then (return s/u time (min) *60 + s/u time in hrs)/60 to convert to hrs

If the s/u time (min) AND s/u time (hrs) are blank then ""

Otherwise, return s/u time (hrs)

*The formula was working up until the last if( statement
I'm guessing that it is a parenthesis problem. Please help me figure this out!


=IF(AND(ISBLANK(VLOOKUP(A2,Data!B2:DU2,13,FALSE)),(VLOOKUP(A2,Data!B2:DU2,14,FALSE)<>"")),(VLOOKUP(A2,Data!B2:DU2,14,FALSE)/60),IF(AND((VLOOKUP(A2,Data!B2:DU2,13,FALSE)<>""),(VLOOKUP(A2,Data!B2:DU2,14,FALSE)<>"")),((VLOOKUP(A2,Data!B2:DU2,13,FALSE)*60)+VLOOKUP(A2,Data!B2:DU2,14,FALSE))/60),if(and((isblank(VLOOKUP(A2,Data!B2:DU2,13,FALSE))),(isblank(VLOOKUP(A2,Data!B2:DU2,14,FALSE)))),"",(VLOOKUP(A2,Data!B2:DU2,13,FALSE))
 
Upvote 0
If the s/u time (min) is blank AND the s/u time (hrs) is not blank, then return the s/u time in hrs and divide by 60 - to convert to hrs

If the s/u time (min) is not blank and s/u time in (hrs) is not blank, then (return s/u time (min) *60 + s/u time in hrs)/60 to convert to hrs

If the s/u time (min) AND s/u time (hrs) are blank then ""

Otherwise, return s/u time (hrs)

*The formula was working up until the last if( statement
I'm guessing that it is a parenthesis problem. Please help me figure this out!


=IF(AND(ISBLANK(VLOOKUP(A2,Data!B2:DU2,13,FALSE)),(VLOOKUP(A2,Data!B2:DU2,14,FALSE)<>"")),(VLOOKUP(A2,Data!B2:DU2,14,FALSE)/60),IF(AND((VLOOKUP(A2,Data!B2:DU2,13,FALSE)<>""),(VLOOKUP(A2,Data!B2:DU2,14,FALSE)<>"")),((VLOOKUP(A2,Data!B2:DU2,13,FALSE)*60)+VLOOKUP(A2,Data!B2:DU2,14,FALSE))/60),if(and((isblank(VLOOKUP(A2,Data!B2:DU2,13,FALSE))),(isblank(VLOOKUP(A2,Data!B2:DU2,14,FALSE)))),"",(VLOOKUP(A2,Data!B2:DU2,13,FALSE))
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,181
Members
452,893
Latest member
denay

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