+ Reply to Thread
Results 1 to 3 of 3

creating a vba code for my inventory

  1. #1
    Registered User
    Join Date
    09-25-2013
    Location
    myob,ok
    MS-Off Ver
    Excel 2007
    Posts
    63

    creating a vba code for my inventory

    Hello

    In my workbook, I have 2 sheets. One is Sheet 1 and the other is Sheet 2.
    In sheet 1 I have the function below in Sheet 1 cell A2 that counts the sku number "JJ-KI-OPED" from Sheet 1 cell B2 if Sheet 2 has it typed in any D:D cell.
    =IF(LEN(B2),COUNTIF(Sheet2!D:D,"*"&B2),"")

    Although the function works like a charm, it's inefficient in telling me how many items I have left instock.
    I would very much like to have a vba code that does the same thing as my function but instead of having Sheet 1 cell A2 return the value of how many sku numbers from Cell B2 where found in cell A2. I want the returning value to be subtracted by any number I typed in cell A2 and the result in C2.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: creating a vba code for my inventory

    Could you just use this formula in cell C2?

    =IF(LEN(B2),COUNTIF(Sheet2!D:D,"*"&B2)-A2,"")
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    09-25-2013
    Location
    myob,ok
    MS-Off Ver
    Excel 2007
    Posts
    63

    Re: creating a vba code for my inventory

    Thank you.
    Last edited by superboy; 10-08-2013 at 03:13 AM.

+ 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. creating updated inventory
    By philmozzz in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-16-2012, 02:16 PM
  2. [SOLVED] creating a running inventory
    By Robert C. in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-27-2012, 07:16 AM
  3. Creating A Running Inventory
    By Caspers in forum Excel General
    Replies: 3
    Last Post: 05-08-2007, 02:15 AM
  4. Creating an inventory worksheet
    By Black friday in forum Excel General
    Replies: 1
    Last Post: 04-19-2006, 05:25 PM
  5. Creating Inventory Macros
    By Rubix in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-14-2006, 09:10 PM

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