user3359453
user3359453

Reputation: 359

Range in excel formula in terms of cell and row index

on a cell I can have formula like this, to check if that cell value is number or not -:

=IsNumber(C8) 

But what if I want to use like this -:

 = isNumber(rowINdex,columnIndex) 

I mean to say, in formula, I want to provide range using rowIndex and columnIndex. How can I do that ?

Upvotes: 2

Views: 773

Answers (2)

luke_t
luke_t

Reputation: 2985

You have tagged VBA - so not sure if you were looking for a VBA solution to this.

Just for clarity though, you can perform the ISNUMBER function within VBA, using the row and column index with the Cells property.

Range("A1").formula = "=ISNUMBER(" & Cells(RowIndex, columnIndex).Address & ")"

Upvotes: 1

Pavel Urubcik
Pavel Urubcik

Reputation: 83

Use combination of ADDRESS and INDEX. ADDRESS defines cell name (string) by calling row and column. INDEX uses this cell name to get the value

your =IsNumber(C8) would look like:

=ISNUMBER(INDIRECT(ADDRESS(8;3)))

Upvotes: 1

Related Questions