Getting an Excel Worksheet's Row's Cell

This procedure is part of the Excel Book. A newer version of the Book is available via the BDK (v2).

This procedure finds a cell in a specific row of a worksheet that matches a given value, regex, or column label.

Syntax

get the row's cell
  the value is "{value}" | the column label is "{label}" | the regular expression is "{regex}"

Options & Inputs

One of the following options is required:

  1. the value is "{value}", where value is the value of the cell you're targeting.

  2. the column label is "{label}", where label is the label of the cell you're targeting.

  3. the regular expression is "{regex}", where regex is a regex that matches the cell you're targeting.

Examples

Given the following table:

A
B
C

1

Movie

Year

Main Character

2

Iron Man

2008

Tony Stark

3

The Dark Knight

2008

Bruce Wayne

4

Black Panther

2018

T'Challa

5

Spider-Man: No Way Home

2021

Peter Parker

Here is how we would find cell Black Panther in cell A4:

1. Using the value is

get the row's cell
  the value is "Black Panther"

2. Using the column label is

get the row's cell
  the column label is "A"

3. Using the regular expression is

get the row's cell
  the regular expression is "[Bb]lack [Pp]anther"

Last updated

Was this helpful?