Multiple Functions In On Cell

Bonehammer

New Member
Joined
Jan 12, 2016
Messages
5
This is a rookie question but I have searched several Knowledge Bases/Blogs and have not yielded any results that were helpful.
I am trying to write a programming statement to achieve the following:

I am checking 2 different cells looking for specific data and then posting results based on that. I want a formula that will run multiple tests and once the criteria is met, the cell is populated with a results.
In simple terms I want to ask the following questions:
Is it the “Front Desk” and were they receiving “Regular Pay”, if so the populate GL Code “501121”
If there is no result the field should remain blank and then I would ask the next question
Is it the “Front Desk” and were they receiving “PTO”, if so the populate GL Code “5012101”
If there is no result the field should remain blank and then I would ask the next question
And so on, etc…

I have about 50 questions to run through

Here is my example

Please note that “Column B” and “Column D” will be populated. I would put this in “Column A”

=IF(AND(B9="Front Desk",D9="Regular Pay"),"501121","")
=IF(AND(B9="Front Desk",D9="PTO"),"5012101","")
Now the first line works and if both cells meet the criteria, then "5021121" appears.
but when I want to run both lines, I get "False".
Keep in mind that I want to be able to use the same complete formula in all line items so I can just drag it down and populate the field it's in. I have 50 categories that I would be checking so I would need to be able to accommodate that.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi,

I believe the formula below may assist...

=IF(AND(B9="Front Desk",D9="Regular Pay"),"501121", IF(AND(B9="Front Desk",D9="PTO"),"501221", ""))

I hope this helps.

Pam
 
Upvote 0

Forum statistics

Threads
1,214,927
Messages
6,122,311
Members
449,080
Latest member
jmsotelo

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