![]() |
using range, and/or offset to complete table.
I have a macro that fills a range(column-a) with dates. the number of
dates can very from 2 - 210. the macro then fills column-b with a lookup value from a range in the workbook.All works fine to this point. next i want to put another formula in col C beginning one row below the first date and going through the end of the dates. So if column a1-a10 has dates I want to put the formula in cells c2-c10. I am not sure how to test for cell in column a (or b) is greater than"" .. thanks for any suggestions. BRC |
using range, and/or offset to complete table.
I like to pick out a column that has data in it and use that to determine the
lastrow. Dim LastRow as long with worksheets("sheet99999") lastrow = .cells(.rows.count,"A").end(xlup).row .range("C1:C" & lastrow).formula = "=yourformulahere" end with BRC wrote: I have a macro that fills a range(column-a) with dates. the number of dates can very from 2 - 210. the macro then fills column-b with a lookup value from a range in the workbook.All works fine to this point. next i want to put another formula in col C beginning one row below the first date and going through the end of the dates. So if column a1-a10 has dates I want to put the formula in cells c2-c10. I am not sure how to test for cell in column a (or b) is greater than"" . thanks for any suggestions. BRC -- Dave Peterson |
using range, and/or offset to complete table.
Or, if you don't want to use a macro.
=IF(A2"","y",IF(B2"","z","")) Put it in C2 and copy down. "BRC" wrote: I have a macro that fills a range(column-a) with dates. the number of dates can very from 2 - 210. the macro then fills column-b with a lookup value from a range in the workbook.All works fine to this point. next i want to put another formula in col C beginning one row below the first date and going through the end of the dates. So if column a1-a10 has dates I want to put the formula in cells c2-c10. I am not sure how to test for cell in column a (or b) is greater than"" .. thanks for any suggestions. BRC |
using range, and/or offset to complete table.
A2""
B2"" That test results in a False answer if the cell contains a number (stored as a number). Don't imagine that is the intent. maybe A2<"" , B2<"" -- Regards, Tom Ogilvy "JLGWhiz" wrote in message ... Or, if you don't want to use a macro. =IF(A2"","y",IF(B2"","z","")) Put it in C2 and copy down. "BRC" wrote: I have a macro that fills a range(column-a) with dates. the number of dates can very from 2 - 210. the macro then fills column-b with a lookup value from a range in the workbook.All works fine to this point. next i want to put another formula in col C beginning one row below the first date and going through the end of the dates. So if column a1-a10 has dates I want to put the formula in cells c2-c10. I am not sure how to test for cell in column a (or b) is greater than"" .. thanks for any suggestions. BRC |
All times are GMT +1. The time now is 10:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com