Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
BRC BRC is offline
external usenet poster
 
Posts: 10
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OFFSET() not working within a SUMPRODUCT() when refering to a range in a pivot table Conan Kelly Excel Worksheet Functions 6 April 11th 07 12:32 AM
using solver to complete a table justhrowit Excel Worksheet Functions 4 February 9th 06 07:20 PM
Problem with Range.Cells.Offset and Range.Cells( row + offset, column) [email protected] Excel Programming 2 August 22nd 05 05:25 AM
Ref from table - complete Steve Excel Worksheet Functions 3 June 23rd 05 06:47 PM
Please Help - Trying to use one table to complete another Methodman1 Excel Discussion (Misc queries) 4 June 13th 05 04:01 PM


All times are GMT +1. The time now is 09:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"