LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 75
Default Macro auto fill formula

Having a quirky issue

I've set up a macro that runs fine on my system but isn't working on a
co-worker's system (and it had been working fine for a couple of months prior
to now). Here's the code:

Range("B11").Select
ActiveCell.FormulaR1C1 =
"=IF(LEFT(RC[-1],1)<""A"",IF(LEN(RC[-1])=14,LEFT(RC[-1],5),Left(RC[-1],4)),VLOOKUP(RC[-1],'[FA Vehicles PCard DO NOT DELETE.xls]Sheet 1'!C1:C2,2,FALSE))"
Range("b11").AutoFill Destination:=Range("b11:B" & endRow)
Range("b11").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("b11:b" & endRow).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Basically, it copies the formula down the column. On her system, the
formula works in the first cell but then copies the result from the first
cell down -- not the formula, so the whole column has the same data.

We're using the same source data. I've tried reinstalling the macro on her
system but it's still not working. We have the same versions of Excel (2003)
and VB (6.5). The only thing that is different recently is that she's
learning macros and has been playing with the system (but hasn't touched this
macro -- even if she had, I've reinstalled it so this shouldn't be an issue).
I've tried deleting her personal workbook and reactivating it, but no luck.
Any ideas?

 
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
Recording Macro to auto-fill Zee Excel Discussion (Misc queries) 1 July 2nd 08 11:12 PM
Auto formula fill Connie Martin Excel Discussion (Misc queries) 5 December 19th 06 08:01 PM
Auto fill of formula ksr Excel Worksheet Functions 7 June 6th 06 05:46 PM
auto formula fill Connie Martin Excel Discussion (Misc queries) 1 March 22nd 06 06:11 PM
Macro for Auto Fill carolini Excel Discussion (Misc queries) 2 December 6th 05 09:11 PM


All times are GMT +1. The time now is 08:53 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"