Notices
Non Scooby Related Anything Non-Scooby related

More Excel VBA questions

Thread Tools
 
Search this Thread
 
Old 07 February 2002, 12:44 PM
  #1  
MattN
Scooby Regular
Thread Starter
 
MattN's Avatar
 
Join Date: Nov 2000
Posts: 2,174
Likes: 0
Received 0 Likes on 0 Posts
Post

Ok - I'm getting there honest.

I have a vlookup formula and I want to copy it down throught the spreadsheet. The problem as usual is the spreadsheet has a different number of rows each time.

I can't find away of just selecting the cells that need filling. The F5 special almost works but just copies in the formuala exactly as it appears in the first vlookup and so returns that value throughout. I need to Vlookup formula to select the corresponding cell each time not the same one!!!!

It must be easy????
Old 08 February 2002, 12:15 PM
  #2  
MattN
Scooby Regular
Thread Starter
 
MattN's Avatar
 
Join Date: Nov 2000
Posts: 2,174
Likes: 0
Received 0 Likes on 0 Posts
Post

scoobynet fails????? That's a first
Old 08 February 2002, 12:28 PM
  #3  
Fosters
Scooby Regular
 
Fosters's Avatar
 
Join Date: Jul 2000
Location: Islington
Posts: 2,145
Likes: 0
Received 0 Likes on 0 Posts
Post

more info? what's the forumla doing? Do you need to know the number of rows?
Old 08 February 2002, 02:46 PM
  #4  
Martingb
Scooby Regular
 
Martingb's Avatar
 
Join Date: Oct 2001
Posts: 65
Likes: 0
Received 0 Likes on 0 Posts
Post

Matt,

I normally use a do loop method to create formuale down a sheet.
Example code to calculate column B * C:

Dim iCounter as Integer 'Used to increment for each row

range("a2").select
iCounter = 2 'Match to the first row of the starting point

do
activecell.offset(0,3).formula="=B" & icounter & " * C" & icounter
activecell.offset(1,0).select ' Move to next row
iCounter = iCounter + 1 ' Increment counter
loop until activecell.value = "" 'Loops down column A until a blank cell is found
Range("a1").select

The vlookup can be substituted to the formula.

if you need any more help email me.

Martin.
Old 08 February 2002, 04:50 PM
  #5  
MattN
Scooby Regular
Thread Starter
 
MattN's Avatar
 
Join Date: Nov 2000
Posts: 2,174
Likes: 0
Received 0 Likes on 0 Posts
Post

cheers Martin
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
28 December 2015 11:07 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
18 November 2015 07:03 AM
leg200
Subaru Parts
5
07 October 2015 07:31 AM
Brzoza
Engine Management and ECU Remapping
1
02 October 2015 05:26 PM



Quick Reply: More Excel VBA questions



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