Hi DavidRailey,
Thank you for reaching out. My name is Furkaan, a user just like you. I’d be happy to help you with your concerns. Here's the formula you can use in Excel to calculate the running balance based on In and Out entries:
Excel
=IF(OR(A2<>"",B2<>""),C1-B2,C1)
Use code with caution.
Explanation:
A2: This represents the cell in the "In" column for the current row (assuming your headers are in row 1). Adjust this cell reference based on your actual header location.
B2: This represents the cell in the "Out" column for the current row.
C1: This represents the cell in the "Balance" column for the previous row. This will capture the previous balance amount.
OR(A2<>"",B2<>""): This part checks if there's an entry in either the "In" or "Out" column of the current row. It uses the OR function to check for both conditions.
C1-B2: If there's an entry in "In" or "Out", this calculates the new balance by subtracting the value in "Out" from the previous balance (C1).
C1: If there's no entry in either "In" or "Out", this simply returns the previous balance (C1) without any change.
How to use the formula:
Assuming your headers are in row 1 and data starts in row 2, enter the formula in cell C2 (the first cell in the "Balance" column with data).
Copy the formula down throughout the "Balance" column.
When you enter values in the "In" or "Out" columns, the formula will automatically update the balance based on the previous balance and the current "Out" value. If there's no entry in either column, the balance will remain unchanged.
If you have any additional questions or concerns, please don’t hesitate to reach out. Give back to the Community. Help the next person who has this issue by indicating if this reply solved your problem. Click Yes or No below.
Best Regards,
Furkaan