skip to Main Content

I’ve put together a table to track the success of some SEO efforts. For each row I’d like to compare the starting value with the most recent value. We update this table each week, so it’d be great if it could dynamically reference the last non-blank space.

I tried this with Vlookup and Hlookup, but they both seem to only want to work vertically down the column.

This is what I’ve got now, but again, it’s looking up values in the column instead of the row.

=VLOOKUP(C3+99,C5:C99,1)-C5

screenshot

I’m new to this, so I’m feeling pretty lost.

2

Answers


  1. Try VBA. It is good to learn, especially if you are doing any technical work (SEO results can be tricky to interpret).

    Here is an idea of the logic you could use for your first relatively simple VBA program:

    1. Declare variables
    2. Set up a loop. Evaluate the value of each cell, and stop the loop when the contents are “”.
    3. Take the cell value and store it in a variable.
    4. Compare the value of the dynamically-located last value with the first value (also stored in a variable). You could do mathematical operations (find the difference, or % variance) or boolean operations (return true/false if the values = each other).
    Login or Signup to reply.
  2. Try this:

    =C5-OFFSET(C5,0,COUNTA(C5:AAA5)-1)

    CountA counts the number of non-empty spaces and offset retrieves a value from a specified number of cells away.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search