+ Reply to Thread
Results 1 to 2 of 2

Trying to figure out some budget calculations and formatting?

  1. #1
    Registered User
    Join Date
    10-26-2007
    Posts
    1

    Trying to figure out some budget calculations and formatting?

    I have attached an example, as well included this screenshot to show you what I am talking about below.



    This is what’s going on here; On the red line, this is a normal transaction where I enter in a value, select my category, and the correct category fills in that value. There are 2 categories here, so if I selected ATM Cash in Column 2, it would have put -5.00 in that column and 0 in the Purchases column.

    Now, in the event of a category adjustment as a line item, as outlined by the row in blue, I have entered a category in column 2 which is my from category, entered my to category in column 3, and put in my positive dollar amount to adjust in column 4. What should happen then is that column 5 and column 6 show the correct added and subtracted value amounts as a “From/To” type of display.

    The catch here is that as more rows of entries are put on the sheet, there are no defined rows for category adjustments, meaning that column 5 and 6 need to have a formula that can accommodate for both situations listed above. These two situations are (Normal Entry, and Category Adjustment).

    Hopefully I was able to explain this well enough. I am at a loss and have tried nested if statements, etc. If anyone has a clue, let me know.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Excelenator's Avatar
    Join Date
    07-25-2006
    Location
    Wantagh, NY
    Posts
    333
    The formula for Column F is

    =IF(AND($D2=0,$B2=F$1),$A2,IF($B2=F$1,$D2,-$D2))

    You can copy this down as far as needed in column F and over to Columns G through however many columns you have.
    ---------------------------------------------------
    ONLY APPLIES TO VBA RESPONSES WHERE APPROPRIATE
    To insert code into the VBE (Visual Basic Editor)
    1. Copy the code.
    2. Open workbook to paste code into.
    3. Right click any worksheet tab, select View Code
    4. VBE (Visual Basic Editor) opens to that sheets object
    5. You may change to another sheets object or the This Workbook object by double clicking it in the Project window
    6. In the blank space below the word "General" paste the copied code.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

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