The "IF" function (see the part of spread sheet attached)or two formulas in one is it possible?

zackn2hiq

New Member
Joined
Apr 7, 2011
Messages
3
I am haveing some problems in resolving this one and no one I know can answer it for me. I have this formula in place working
=IF((OR(D7="",D6="")),0,IF((D7<D6),((D7-D6)*24)+24,(D7-D6)*24))
BUT I need to add the option of
=if("Lunch" is selected from drop box,the amount the above formula is for
will result in "0" instead.
<TABLE style="WIDTH: 131pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=174><COLGROUP><COL style="WIDTH: 83pt; mso-width-source: userset; mso-width-alt: 4022" width=110><COL style="WIDTH: 48pt; mso-width-source: userset; mso-width-alt: 2340" width=64><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: #ddd9c4; WIDTH: 83pt; HEIGHT: 15pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" class=xl67 height=20 width=110>DESCRIPTION</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 48pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" width=64></TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: #b7dee8; HEIGHT: 15pt; BORDER-TOP: windowtext 0.5pt solid; BORDER-RIGHT: windowtext 0.5pt solid" class=xl68 height=20>Lunch</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0"><This is drop box</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: gray 0.5pt solid; BORDER-LEFT: gray 0.5pt solid; BACKGROUND-COLOR: #ffcc99; HEIGHT: 15pt; BORDER-TOP: gray 0.5pt solid; BORDER-RIGHT: gray 0.5pt solid" class=xl63 height=20>8:00 AM</TD><TD style="BORDER-BOTTOM: gray 0.5pt solid; BORDER-LEFT: gray; BACKGROUND-COLOR: #ffcc99; BORDER-TOP: gray 0.5pt solid; BORDER-RIGHT: gray 0.5pt solid" class=xl64> Total </TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: gray 0.5pt solid; BACKGROUND-COLOR: #ffcc99; HEIGHT: 15pt; BORDER-TOP: gray; BORDER-RIGHT: gray 0.5pt solid" class=xl65 height=20>9:30 AM</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: gray; BACKGROUND-COLOR: #ffcc99; WIDTH: 48pt; BORDER-TOP: gray; BORDER-RIGHT: gray 0.5pt solid" class=xl66 width=64>1.50 </TD></TR></TBODY></TABLE> ^this is amount effected or where formula is
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
zack,

Your formula is not clear.
IF((OR(D7="",D6="")),0,IF((D7
???

Where is the dropdown? In D5?

Please, clarify

M.
 
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