+ Reply to Thread
Results 1 to 7 of 7

looping question by columns

  1. #1
    Registered User
    Join Date
    04-28-2010
    Location
    united states
    MS-Off Ver
    Excel 2003
    Posts
    12

    looping question by columns

    I want to print out the starting Date of the inventory based on inventory quantity using Macro.
    Here is my explanation;
    Some months don’t produce any inventory(0 or null) but other months can produce
    Some inventory. I want to print out the first starting date of the inventory. So we can know
    When is the first starting date for the product.
    In the file examples, A- the product starts producing in Sep-10, so the result will be 9/1/2010 on D:7
    B- The product starts producing in Dec_10, so the result will be 12/1/2010 on D:7

    My try out;
    Please Login or Register  to view this content.
    Would you help me
    Attached Files Attached Files
    Last edited by jimmymoon; 09-27-2010 at 12:37 PM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,607

    Re: looping question by columns

    Cross-post: http://www.ozgrid.com/forum/showthread.php?t=146531

  3. #3
    Registered User
    Join Date
    04-28-2010
    Location
    united states
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: looping question by columns

    StephenR,
    sorry to forget the rules. Now I understand "Cross Post"
    I already delete the posted contents in the other forum(the forum will delete my thread title).

    would you help me?

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    15,449

    Re: looping question by columns

    Have you tried cells.column?

    Have you read our forum rules?

  5. #5
    Registered User
    Join Date
    04-28-2010
    Location
    united states
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: looping question by columns

    Would you look at my attached file?
    I can not get any result after run Macro.
    would you help me.
    Attached Files Attached Files

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: looping question by columns

    Hello jimmymoon,

    The attached workbook has a User Defined Function (UDF) called InventoryDate. This works like a worksheet formula. In cell "A4" you will see "=InventoryDate(B3:M3)". This will return the date of the first non-blank/no-zero entry in the range. Her is the code.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  7. #7
    Registered User
    Join Date
    04-28-2010
    Location
    united states
    MS-Off Ver
    Excel 2003
    Posts
    12

    Smile Re: looping question by columns

    Thank you very much for your help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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