LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default New to Programming

I am new to programming in VBA, and I am having trouble getting my program to
do what I want it too. Basically, We enter names and hours worked into one
sheet, then I want to find that persons hourly rate from another worksheet
and multiply it by their hours. These totals need to be added together to
only include employees of the company and not contractors, material, or
travel (that is what the "M" stands for). I am getting runtime errors when I
run the program. Any help, suggestions or otherwise is greatly appreciated!!

Function Labor()
Dim row As Long
ActiveCell.Formula = 0
For row = 3 To 34
If Worksheets("INPUT").Cells(row, "C").Value = "M" Then
ML =
Application.WorksheetFunction.Index(Worksheets("NA MES").Range("A10:K100"),
Application.WorksheetFunction.Match(Worksheets("IN PUT").Cells(row, D).Value,
Worksheets("NAMES").Range("A10:A100"), 1), WorksheetFunction.Match(H1,
Worksheets("NAMES").Range("A10:K10"), 1)) * Cells(row, "H")
ActiveCell.Formula = ActiveCell.Formula + ML
End If
Next row
End Function

Thank you!!
 
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
VBA Programming [email protected] New Users to Excel 2 May 28th 08 08:38 PM
CD Programming nelson Excel Discussion (Misc queries) 0 June 4th 06 04:32 PM
VBA programming kush28 Excel Programming 1 February 9th 06 08:05 AM
programming Daren Excel Programming 1 November 10th 05 09:55 PM
Please help with programming RandyJ Excel Programming 2 October 8th 04 10:59 PM


All times are GMT +1. The time now is 06:36 AM.

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"