VBS Scripting Help

Dano-94-79 1 Reputation point
2022-04-27T20:11:52.593+00:00

Hello friends,
Was hoping to get some help on creating a vb script to highlight some data.

In a spreadsheet, in column F, I have a certain value highlighted. I need to be able to find that highlighted value (EBB Access) and have the cell immediately below it highlight (or change font or something to easily identify it).

197141-image.png

Any help would be very much appreciated.

Microsoft 365 and Office Development Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 60,161 Reputation points
    2022-04-27T20:37:27.023+00:00

    Rather than using a script why don't you use conditional formatting instead. Given the column you could apply the conditional format expression =INDIRECT(ADDRESS(ROW()-1,COLUMN()))="EBB Access" to the column. Any row that is immediately preceded by a row with that value in the same column would then be formatted how you want.

    0 comments No comments

  2. Dano-94-79 1 Reputation point
    2022-04-28T18:13:06.203+00:00

    Thanks for the info but, I'm an idiot and am having trouble getting it to work.
    In the conditional formatting formula I am entering =INDIRECT(ADDRESS(ROW(3)-1,COLUMN(7)))="EBB Access" to no avail. Tried may other combos too.
    If the starting row is at row 3 for all of column G, what should that look like? Can't thank you enough.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.