+ Reply to Thread
Results 1 to 3 of 3

One filed is not updating in Stock Sheet

  1. #1
    Registered User
    Join Date
    10-26-2011
    Location
    daska, Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    46

    One filed is not updating in Stock Sheet

    I am new in vba. Please help me to solve the issue . I have sheet "Stock" and from row 2 to row 6 we have data entry fields . All things updating in stock sheet except Row5 C5 and the code is in Module3 .
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: One filed is not updating in Stock Sheet

    Can you describe in words what the code in module 3 is supposed to do?

  3. #3
    Registered User
    Join Date
    10-26-2011
    Location
    daska, Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: One filed is not updating in Stock Sheet

    Sub FillStockList()
    Dim lrow As Long, r As Range, rr As Range
    With Sheets("Stock")
    lrow = .Cells(Rows.Count, 1).End(xlUp).Row + 1
    For Each r In Range("C4", "C5") 'Worksheet "Invoice" is Active sheet
    If Len(r) Then
    Set rr = .Rows(9).Find(Trim(Replace(r(0, 2).Value, "Pack", "")), LookAt:=xlWhole)
    If Not rr Is Nothing Then
    .Value
    Else
    MsgBox "not found " & r(0, 2).Value, 64: Exit Sub
    End If
    End If
    Next r
    .Cells(lrow, 1).Resize(, 2).Value = Array([C2], [C3])
    End With
    MsgBox "Done", 64
    End Sub

    the above code search size which is d2 if its find in line 9 then it paste the other fields on its relative Columns
    Now its not updating c5 fields

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA Code to pull Stock Balance Sheet Data from a Stock Symbol in a cell
    By akash1229 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 02-27-2015, 04:37 PM
  2. Stock values linked to physical stock on seperate sheet
    By Andycoulton in forum Excel General
    Replies: 6
    Last Post: 08-28-2013, 05:15 AM
  3. Updating stock with macro
    By Mekanto in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-22-2007, 04:56 AM
  4. Updating a stock sheet?
    By mark.taylor13 in forum Excel General
    Replies: 1
    Last Post: 04-11-2006, 08:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1