Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default macro is to update column 13 and 14 of worksheet "Voice BB Pending"as per column 2 and 3 of "Activity log" .

Dear all,
I am tired of running below macro in Excel 2007, but no use. Please
can anyone help me urgently as my project is held up because of this
silly macro.

Purpose of this macro is to update column 13 and 14 of worksheet
"Voice BB Pending" as per column 2 and 3 of "Activity log" .

"Voice BB Pending" is master sheet and Activity log is daily log
sheet. column 1 of these sheets contain the order numbers whose
updates need to be copied from column 2, 3 of activity log sheet to
column 13, 14 of voice bb sheet.
------------------------------------------------------------------------------------------
Activity sheet is as
A B
C D
Order number Update Dependency Name

Voice BB sheet is as
A M
N
order number Dependency Update

================================================== =================
Sub Caller()
Set shtSource = Worksheets("activity log")
lngLastS = shtSource.Cells(shtSource.Rows.Count, 1).End(xlUp).Row
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
nehaAll "Voice BB pending"
nehaAll "Activated"
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Set shtSource = Nothing
End Sub


Sub nehaAll(strTarget As String)
Dim shtTarget As Worksheet
Dim lngLoopT As Long
Dim lngLoopS As Long
Dim lngLastT As Long
Set shtTarget = Worksheets(strTarget)
lngLastT = shtTarget.Cells(shtTarget.Rows.Count, 1).End(xlUp).Row
For lngLoopS = 2 To lngLastS
For lngLoopT = 3 To lngLastT
Sheets("activity log").Cells(lngLoopS, 4).Select
If shtSource.Cells(lngLoopS, 1).Value =
shtTarget.Cells(lngLoopT, 1).Value Then
shtTarget.Cells(lngLoopT, 13).Value =
shtSource.Cells(lngLoopS, 3).Value
shtTarget.Cells(lngLoopT, 14).Value =
shtTarget.Cells(lngLoopT, 14).Value & vbNewLine & CStr(Date) & ";" &
shtSource.Cells(lngLoopS, 4).Value & ";" & shtSource.Cells(lngLoopS,
2).Value & "***Dependency:-" & shtSource.Cells(lngLoopS, 3)

End If
Next lngLoopT
Next lngLoopS
Set shtTarget = Nothing
End Sub
=============================================
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default macro is to update column 13 and 14 of worksheet "Voice BBPending" as per column 2 and 3 of "Activity log" .

On 19 Ago, 08:54, San wrote:

cut

* For lngLoopS = 2 To lngLastS


How lngLastS is decalred?
Is set in Caller()
lngLastS = shtSource.Cells(shtSource.Rows.Count, 1).End(xlUp).Row

but is used in nehaAll()

Bye!
Scossa
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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How do I change the column heading in Excel to display "A" "B" "C Thai New Users to Excel 1 November 30th 07 08:06 PM
Filter one column for all "Pending" CaptDunsull Excel Worksheet Functions 1 November 23rd 05 05:59 PM
Please add a "sheet" function like "row" and "column" functions Spreadsheet Monkey Excel Programming 2 November 8th 05 04:08 PM
How do I split "A1B2" into "A1" and "B2" using text to column fun. Jennifer Excel Programming 1 February 2nd 05 10:01 PM


All times are GMT +1. The time now is 04:58 AM.

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"