syntax of an If formula

dpaton05

Well-known Member
Joined
Aug 14, 2018
Messages
2,352
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have this formula: =IF(E5=”Activities”,U5, ((IF(OR(ISBLANK(A5),ISBLANK(D5),ISBLANK(E5)),0,[@[extra pickup]]+[@[$ 4 extra
hrs]]+[@[$ 4 kms]]+[@[Max
Pay]]))*[@[Staff '#]])*[10% increase])

I have an excel table (made using ctrl T) and I wanted the ability to add a custom amount in the total field without typing over and removing the formula. My formula works if I don't have IF(E5=”Activities”,U5, in the front but it doesn't allow me to add anything.
I have a text field that i can type the custom value and press a button that puts it in a column value of the table, U5, and I wanted that value to get put in the total field in place of the formula if a custom amount is required. I think my idea would work, I just needed help with the syntax.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
The formula has the following syntax:

=IF(E5=”Activities”,U5,xxx)

Ignore the xxx, is there anything wrong with this if statement?
 
Upvote 0
maybe retype your quotations marks "" in your cell around Activities ?
 
Upvote 0
How do I copy a text box to a cell with a command button?
 
Last edited:
Upvote 0
Nothing wrong with the syntax of the IF statement, assuming the xxxx is a cell reference !
Regarding the text box to cell macro....give us more detail on what you want to achieve.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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