Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
How do I change the column heading in Excel to display "A" "B" "C | New Users to Excel | |||
Filter one column for all "Pending" | Excel Worksheet Functions | |||
Please add a "sheet" function like "row" and "column" functions | Excel Programming | |||
How do I split "A1B2" into "A1" and "B2" using text to column fun. | Excel Programming |