Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default MACRO HELP NEEDED

Hi all, Can any body please help me with the macro below

Sub MultAmt()
Const x = 12
Dim i As Integer
Dim LRow As Long
Dim rng As Range, c As Range
Dim rng2 As Range, c2 As Range

LRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row
Set rng = Sheet2.Range("D2:D" & LRow)
LRow = Sheet3.Cells(Rows.Count, "A").End(xlUp).Row
If LRow = 1 Then
'do nothing
Else
Sheet3.Rows("2:" & LRow).Delete
End If
i = 1
For Each c In rng
LRow = Sheet3.Cells(Rows.Count, "A").End(xlUp).Row
c.EntireRow.Copy Sheet3.Range("A" & LRow + i & ":A" & LRow +
x)
Next
LRow = Sheet3.Cells(Rows.Count, "A").End(xlUp).Row
Set rng = Sheet3.Range("D2:D" & LRow)
LRow = Sheet1.Cells(Rows.Count, "A").End(xlUp).Row
Set rng2 = Sheet1.Range("A3:M" & LRow)
i = 2
For Each c In rng
c.Offset(, 1).Value = c.Offset(, 1).Value * _
(Application.WorksheetFunction.VLookup(c.Value, rng2, i) /
100)
If i = 13 Then
i = 2
Else
i = i + 1
End If
Next
Sheet3.Columns("E:E").NumberFormat = "0"
End Sub

This macro is already on my sheet which i have uploaded (see the link
below to look at the sheet)
http://www.savefile.com/files/1530076
Please give a look to my sheet as i have explained what i need on the
sheet. i think what i required need some amendment in macro which i
cant figure out how to do. If any friend can do that for me it will
very helpful. Many thanks
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 help needed Old_skills_lost[_2_] Excel Programming 2 January 29th 08 09:56 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Macro needed to set macro security in Excel to minimum Carl Excel Programming 3 March 18th 06 03:36 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


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