Reputation: 359
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
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
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