Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default Can someone please tell me why my code stopped working???

Option Explicit

The code below worked for a few days and just totally stopped working.
What can I do to make sure it continues to work? Thanks!

-----



Private Sub Worksheet_Change(ByVal Target As Range)
Dim C As Range, D As Range
Set D = Intersect(Range("A:A"), Target)
If D Is Nothing Then Exit Sub
For Each C In D


On Error Resume Next
Target.Offset(0, 6).FormulaR1C1 = "=RC[-2]&RC[-5]" ' - For Column E
Target.Offset(0, 7).FormulaR1C1 = "=RC[-2]&RC[-5]" ' - For Column F
Target.Offset(0, 9).FormulaR1C1 = "=IF(ISNA(VLOOKUP(RC7,I.O.!
R2C1:R5708C5,4,FALSE))=TRUE,0,VLOOKUP(RC7,I.O.!R2C 1:R5708C5,4,FALSE))"
' - For Column J
Target.Offset(0, 10).FormulaR1C1 = "=IF(ISNA(VLOOKUP(RC8,'Mellon
Download'!R2C1:R4573C3,2,FALSE))=TRUE,0,VLOOKUP(RC 8,'Mellon Download'!
R2C1:R4573C3,2,FALSE))" ' - For Column K
Target.Offset(0, 11).FormulaR1C1 = "=RC[-2]-RC[-1]" ' - For Column L
Target.Offset(0, 12).FormulaR1C1 = "=IF(ISNA(VLOOKUP(RC7,I.O.!
R2C1:R5392C5,5,FALSE))=TRUE,0,VLOOKUP(RC7,I.O.!R2C 1:R5392C5,5,FALSE))-
IF(ISNA(VLOOKUP(RC8,'Mellon Download'!R2C1:R4573C3,3,FALSE))=TRUE,
0,VLOOKUP(RC8,'Mellon Download'!R2C1:R4573C3,3,FALSE))" ' - For Column
M
Target.Offset(0, 13).Value = "1" ' - For Column N
Target.Offset(0, 14).FormulaR1C1 = "=RC[-2]*RC[-1]" ' - For Column O
Target.Offset(0, 15).FormulaR1C1 = "=TODAY()" ' - For Column p
Target.Offset(0, 16).FormulaR1C1 = "=IF(RC[-1]="""","""",TODAY()-RC
[-1])" ' - For Column Q

Next C

End Sub
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
Macro stopped working Ed Davis[_2_] Excel Discussion (Misc queries) 5 October 7th 09 11:46 PM
CTRL+' stopped working jordygirl Excel Discussion (Misc queries) 5 August 24th 09 08:03 PM
Keyboardshortcuts stopped working Kasper Egelund Excel Discussion (Misc queries) 2 March 13th 08 02:06 PM
formula stopped working.... Ken Proj mgr Excel Discussion (Misc queries) 5 December 29th 06 03:57 PM
VB Stopped Working [email protected] Excel Worksheet Functions 1 April 28th 05 01:56 PM


All times are GMT +1. The time now is 03:35 PM.

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

About Us

"It's about Microsoft Excel"