# how to enter value in cell based on logic from other two cells?

1. ## how to enter value in cell based on logic from other two cells?

I have 3 cells that need to work together. I want to enter the pay-rate(J2) for each person but I do not want to do it manually. I want to fill in J2 but off of logic using E2 and F2. For example, If E2 says "weekend" and F2 says "Day" then I want it to reference D2 from my other worksheet which is the value for weekday+Day = \$10. So \$10 would reflect back on my first sheet under pay-rate (J2).

I am assuming may need to some multiple statement to achieve this, however functions are not my strong suite in excel. I would also think it would be a very large logic to input all 6 combinations.

Here are all the payrate different combinations...

Different pay rate combinations (pic below, these values live on a different sheet)
Weekday Day \$10
Weekday Evening \$20
Weekday Night \$25
Weekend Day \$20
Weekend Evening \$25
Weekend Night \$30

1.PNG

2.PNG

2. ## Re: how to enter value in cell based on logic from other two cells?

In J2 try...

=IFERROR(INDEX(Sheet4!\$D\$2:\$D\$7,MATCH(E2&F2,Sheet4!\$B\$2:\$B\$7&Sheet4!\$C\$2:\$C\$7,0)),"")

IMPORTANT
• This is an array formula
• Enter the formula >> press F2 then >> CTRL + SHIFT + ENTER
• If entered correctly, the formula will be enclosed in {brackets}
• Do not enter the {brackets} manually

BTW: Next time you may want to post a workbook rather than a picture. Much easier to test plus no need to have to retype your data.

3. ## Re: how to enter value in cell based on logic from other two cells?

wow, my head is spinning with that formula. Thank you for your post.. I have uploaded my workbook. Can you please enter it for me so i have a better understanding?

thank you

4. ## Re: how to enter value in cell based on logic from other two cells?

Sure, no problem. Give this a try...

5. ## Re: how to enter value in cell based on logic from other two cells?

Originally Posted by jeffreybrown
Sure, no problem. Give this a try...
Thank you man! I really appreciate it. Looks great, but just 1 tad issue lol. You placed in it the payout but should have been in \$ rate . I think I can try to paste the code to the next column and make it work.

Thank you again, I appreciate your help.

6. ## Re: how to enter value in cell based on logic from other two cells?

You are most welcome and thanks for the rep. Happy to help.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1