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