Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello, I am struggling to find a solution to the following problem an would really appreciate any help. On Sheet1 I have a list of jobs numbers in column A, column B is th customer, column C is the date, column D is the price, column E is th invoice number. I have a loop which looks though column B and basically says i customer = "United" then put an invoice number in column E. This works fine but at the same time this loop is running I would lik it to populate the Invoice Sheet. So, for example, it has verified that job number 1 is United so has pu invoice number 100 in column D. It would then need to go into th Invoice Sheet and put Job Number 1 in cell A1, the date for job 1 i B1, the price for job 1 in C1. The next time the loop goes round it would need to put the invoic number in column D again but when it goes to the invoice sheet it wil realise that there is already something in A1 so it will put it in A2. The code for my loop is -------------------------------- Sub InvoiceUnitedJobs() Dim cell As Range For Each cell In Worksheets("Sheet1").Range("B:B") If cell.Value = "United" Then cell.Offset(0, 3).Value = 1 Else End If Next End Sub ------------------------------- I know this explanation has been very long-winded but would appreciat any guidance. Thanks John -- johncassel ----------------------------------------------------------------------- johncassell's Profile: http://www.excelforum.com/member.php...fo&userid=2501 View this thread: http://www.excelforum.com/showthread.php?threadid=54283 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
simple loop needed please | Excel Discussion (Misc queries) | |||
Loop thru Range Help needed | Excel Programming | |||
loop code needed | Excel Programming | |||
Urgent Help needed on! Copy and Paste a Formula as Values using a Loop statement | Excel Programming | |||
help needed with timer / loop | Excel Programming |