![]() |
Getting a value from a formatted row
Hi
I wonder if some of you can help me with this. This is part of a function (called TotalEnergy) that tries to get a value from a cell formatted with a line at the bottom (excel 2000). LocationDate and SheetSize are variables that has been (well) determined previously in the function. The For - Next statement goes down between these two row positions and has to find the first cell with a line at the bottom, and get the value in other column in that same row. For i = LocationDate To SheetSize If Sheets("Diary").Cells(i, 2).Borders(xlEdgeBottom).LineStyle = xlContinuous Then _ TotalEnergy = Sheets("Diary").Cells(i, 8): Exit For Next i The function works fine in the immediate window, it gets the cell value properly. But when I try to use the function in the sheet, excel says that there is a circular reference in some open workbook (and I donīt have any other one open). What could it be? Thanks for any help or advice. MMansilla |
Getting a value from a formatted row
Thanks Martin,
I use the function in a different sheet from where the data is, so I'm not evaluating the cell where the function is, though I suspect it is something related to your suggestion. MMansilla Hi Marcelo, Off the top of my head I think it may be becasue the you put function in say cell B1 and it is checking B1 or in H1?. Try put it on in a cell you are not checking. -- |
All times are GMT +1. The time now is 12:28 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com