Need help with formulas

DKRbella0814

Board Regular
Joined
Aug 10, 2008
Messages
155
All of the below formulas are in working order; the one thing I would like to do is add programming language to say that

- if the formula returns an error, then I want a "" blank in the cell; otherwise, perform calculations as indicated.

can someone help me out? Thanks!

=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))))


=IF(F2="","",IF(F2>0,((VLOOKUP(A2,Data!$B2:$DU2,19,FALSE)*Calculations2!D2)+VLOOKUP(A2,Data!$B2:$DU2,12,FALSE)),(VLOOKUP(A2,Data!$B2:$DU2,19,FALSE)*Calculations2!D2)))
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

T. Valko

Well-known Member
Joined
May 9, 2009
Messages
16,623
All of the below formulas are in working order; the one thing I would like to do is add programming language to say that

- if the formula returns an error, then I want a "" blank in the cell; otherwise, perform calculations as indicated.

can someone help me out? Thanks!

=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))))


=IF(F2="","",IF(F2>0,((VLOOKUP(A2,Data!$B2:$DU2,19,FALSE)*Calculations2!D2)+VLOOKUP(A2,Data!$B2:$DU2,12,FALSE)),(VLOOKUP(A2,Data!$B2:$DU2,19,FALSE)*Calculations2!D2)))
If you're using Excel 2007 or later then it's pretty simple.

=IFERROR(your_formula_here,"")

If you're not using Excel 2007 or later then it looks like it could get really ugly!

I think I might just use those formulas as intermediate results and then use a "good" formula to test the results of those formulas. Like this:

First formula in A1, the other formula in A2, then:

=IF(ISERROR(A1),"",A1)
=IF(ISERROR(A2),"",A2)
 

Forum statistics

Threads
1,141,016
Messages
5,703,748
Members
421,312
Latest member
Mooncake1

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