VLOOKUP Maybe???

IsItFriday

New Member
Joined
Dec 20, 2022
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am attempting to make a long drawn-out process at work a bit simpler however I am running into a few issues.
I'm somewhat new to excel so please be patient with me if I do not understand right away or if my questions are elementary.

I am pulling information from a report and dumping it into a tab in my workbook.
My goal is to have specific numbers autofill into a cell based on a specific string of text. (Employee ID)
Normally a vlookup formula would be my go-to however there are multiple balances in the cell I am needing to pull from. (I am probably horrible at explaining this.)

In the table listed below I am wanting the last available running balance.
In another cell I am needing the "Balance Forward" balance.
Then in a different cell I am needing the total sum of negative Vacation hours or what is in the total debits.

So far I have =VLOOKUP(AB5,'Accrual Detail'!A8463:H8491,8,FALSE)

However it is giving me the -7.17 since that is the first value.

Any advice or help would be greatly appreciated!!!

Employee IDEmployeeAccrual CodeEffective DateActionAmountAmount FlagRunning Balance
7353270​
Smith, John WillPTO (Hours)Fri 12/30/2022Balance Forward-7.17
7353270​
Smith, John WillPTO (Hours)Fri 1/13/2023Earned1.38-5.78
7353270​
Smith, John WillPTO (Hours)Fri 1/13/2023Earned0.00-5.78
7353270​
Smith, John WillPTO (Hours)Fri 1/27/2023Earned1.38-4.40
7353270​
Smith, John WillPTO (Hours)Fri 1/27/2023Earned0.00-4.40
7353270​
Smith, John WillPTO (Hours)Fri 2/10/2023Earned0.00-4.40
7353270​
Smith, John WillPTO (Hours)Fri 2/10/2023Earned1.38-3.02
7353270​
Smith, John WillPTO (Hours)Total Debits0.00
7353270​
Smith, John WillPTO (Hours)Total Credits4.15
7353270​
Smith, John WillVacation (Hours)Fri 12/30/2022Balance Forward3.33
7353270​
Smith, John WillVacation (Hours)Sun 1/1/2023Earned80.0083.33
7353270​
Smith, John WillVacation (Hours)Fri 1/13/2023Earned0.0083.33
7353270​
Smith, John WillVacation (Hours)Fri 1/20/2023Taken-12.0071.33
7353270​
Smith, John WillVacation (Hours)Sat 1/21/2023Taken-12.0059.33
7353270​
Smith, John WillVacation (Hours)Sun 1/22/2023Taken-12.0047.33
7353270​
Smith, John WillVacation (Hours)Fri 1/27/2023Earned0.0047.33
7353270​
Smith, John WillVacation (Hours)Fri 1/27/2023Taken-12.0035.33
7353270​
Smith, John WillVacation (Hours)Sat 1/28/2023Taken-12.0023.33
7353270​
Smith, John WillVacation (Hours)Sun 1/29/2023Taken-12.0011.33
7353270​
Smith, John WillVacation (Hours)Fri 2/10/2023Earned0.0011.33
7353270​
Smith, John WillVacation (Hours)Total Debits72.00
7353270​
Smith, John WillVacation (Hours)Total Credits80.00
7353270​
Smith, John WillVacation Accrued (Hours)Fri 12/30/2022Balance Forward2.77
7353270​
Smith, John WillVacation Accrued (Hours)Sun 1/1/2023Adjust Carryover Limit-2.770.00
7353270​
Smith, John WillVacation Accrued (Hours)Fri 1/13/2023Earned2.772.77
7353270​
Smith, John WillVacation Accrued (Hours)Fri 1/27/2023Earned2.775.53
7353270​
Smith, John WillVacation Accrued (Hours)Fri 2/10/2023Earned2.778.30
7353270​
Smith, John WillVacation Accrued (Hours)Total Debits0.00
7353270​
Smith, John WillVacation Accrued (Hours)Total Credits8.30
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
In order to get the latest running balance, I think you should be able to use the MAXIFS function, as long as your values in your date column are REALLY entered as dates and not as text.
See: MAXIFS function - Microsoft Support

To get the total sum of Vacation hours, you can probably use the SUMIFS function, which allows you to sum multiple values meeting certain criteria.
See: SUMIFS function - Microsoft Support
 
Upvote 0
Not fully understanding your requirement but see if this is of any help.

Book1
ABCDEFGHIJKLMN
1Employee IDEmployeeAccrual CodeEffective DateActionAmountAmount FlagRunning BalanceXlookupAlternative
27353270Smith, John WillPTO (Hours)Fri 12/30/2022Balance Forward-7.17Employee IDAccrual CodeActionAmountAmount
37353270Smith, John WillPTO (Hours)Fri 1/13/2023Earned1.38-5.787353270PTO (Hours)-3.02
47353270Smith, John WillPTO (Hours)Fri 1/13/2023Earned0-5.787353270Vacation (Hours)Total Debits72.0072.00
57353270Smith, John WillPTO (Hours)Fri 1/27/2023Earned1.38-4.4
67353270Smith, John WillPTO (Hours)Fri 1/27/2023Earned0-4.4
77353270Smith, John WillPTO (Hours)Fri 2/10/2023Earned0-4.4
87353270Smith, John WillPTO (Hours)Fri 2/10/2023Earned1.38-3.02
97353270Smith, John WillPTO (Hours)Total Debits0
107353270Smith, John WillPTO (Hours)Total Credits4.15
117353270Smith, John WillVacation (Hours)Fri 12/30/2022Balance Forward3.33
127353270Smith, John WillVacation (Hours)Sun 1/1/2023Earned8083.33
137353270Smith, John WillVacation (Hours)Fri 1/13/2023Earned083.33
147353270Smith, John WillVacation (Hours)Fri 1/20/2023Taken-1271.33
157353270Smith, John WillVacation (Hours)Sat 1/21/2023Taken-1259.33
167353270Smith, John WillVacation (Hours)Sun 1/22/2023Taken-1247.33
177353270Smith, John WillVacation (Hours)Fri 1/27/2023Earned047.33
187353270Smith, John WillVacation (Hours)Fri 1/27/2023Taken-1235.33
197353270Smith, John WillVacation (Hours)Sat 1/28/2023Taken-1223.33
207353270Smith, John WillVacation (Hours)Sun 1/29/2023Taken-1211.33
217353270Smith, John WillVacation (Hours)Fri 2/10/2023Earned011.33
227353270Smith, John WillVacation (Hours)Total Debits72
237353270Smith, John WillVacation (Hours)Total Credits80
247353270Smith, John WillVacation Accrued (Hours)Fri 12/30/2022Balance Forward2.77
257353270Smith, John WillVacation Accrued (Hours)Sun 1/1/2023Adjust Carryover Limit-2.770
267353270Smith, John WillVacation Accrued (Hours)Fri 1/13/2023Earned2.772.77
277353270Smith, John WillVacation Accrued (Hours)Fri 1/27/2023Earned2.775.53
287353270Smith, John WillVacation Accrued (Hours)Fri 2/10/2023Earned2.778.3
297353270Smith, John WillVacation Accrued (Hours)Total Debits0
307353270Smith, John WillVacation Accrued (Hours)Total Credits8.3
Sheet1
Cell Formulas
RangeFormula
M3M3=XLOOKUP(1,($A$2:$A$30=J3)*($C$2:$C$30=K3)*($H$2:$H$30<>""),$H$2:$H$30,"",0,-1)
M4M4=XLOOKUP(1,($A$2:$A$30=J4)*($C$2:$C$30=K4)*($E$2:$E$30="Total Debits"),$F$2:$F$30,"")
N4N4=SUMIFS($F$2:$F$30,$A$2:$A$30,J4,$C$2:$C$30,K4,$E$2:$E$30,L4)
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,207
Members
452,618
Latest member
Tam84

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