ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   #VALUE! position in column of data (https://www.excelbanter.com/excel-programming/294492-value-position-column-data.html)

Todd huttenstine

#VALUE! position in column of data
 
I have a big range of data in column F. Each cell
contains a formula. If you start from the top and go down
you will eventually hit a cell that has the result of
#VALUE!. What code or formula will tell me the position
of this cell. For example range F5:F500 is filled with
formulas. The result of the formula in cell F341 is
#VALUE!. Tho code or formula need sto return 341. How do
I do this?


Todd Huttenstine

Greg Koppel

#VALUE! position in column of data
 
Sub test()
Range("A1").Select
Do Until ActiveCell.HasFormula = False
If ActiveCell.Text = "#VALUE!" Then MsgBox ActiveCell.Row
ActiveCell.Offset(1, 0).Activate
Loop
End Sub


"Todd Huttenstine" wrote in message
...
I have a big range of data in column F. Each cell
contains a formula. If you start from the top and go down
you will eventually hit a cell that has the result of
#VALUE!. What code or formula will tell me the position
of this cell. For example range F5:F500 is filled with
formulas. The result of the formula in cell F341 is
#VALUE!. Tho code or formula need sto return 341. How do
I do this?


Todd Huttenstine





All times are GMT +1. The time now is 10:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com