Add-in: Highlight active category (2.02 or later)

A few customers have mentioned it would be nice to have some type of marker on the Budget sheet that shows which category you’re dealing with when you’re budgeting. I thought this was a nice idea for an optional add-in. Here’s a little shot of what it will look like once installed:

marker add-in screenshot

  1. With YNAB open, press Alt+F11
  2. You’re now in the Visual Basic Editor. On the left side there is a pane called “Project – VBA Project” (if it’s not visible press Ctrl+r). Double-click on Sheet2 (Budget)
  3. A white page will open to the right. There are two drop-down boxes at the top of the just-opened page. In the left drop-down box select Worksheet
  4. The right drop-down box should automatically say SelectionChange and you should see two lines that have automatically been entered: Private Sub Worksheet_Selection… and End Sub.
  5. In between those two lines, paste the following code:

    If (Target.Column >= 2) And (Target.Column < = 78) Then
    If (Target.Row <= 126) And (Target.Row >= 8) Then
    Range("A8:A126").Interior.ColorIndex = 15
    Range("A" & Target.Row).Interior.ColorIndex = 38
    End If
    End If

  6. Click the Save button in the Visual Basic Editor and close it.

Note that this is for version 2.02 3.0 or later. Give it a test run and see how you like it. Any modifications are, of course, totally up to you.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>