+ Reply to Thread
Results 1 to 7 of 7

Macro to sort out if item out of stock

  1. #1
    Registered User
    Join Date
    09-26-2011
    Location
    Algarve, Portugal
    MS-Off Ver
    Excel 2019
    Posts
    20

    Macro to sort out if item out of stock

    I would like to have a macro something like this according to what's happen in the worksheet:

    **In sheet1(2)**
    If item number (e.g. FBBE00421) also exists on sheet1 OK, if not:
    change the color to red or list all of them in a new sheet or somehow to appear in a textbox, or whatever you might remember is better so i can know what went out of stock, and of course it should also get me full row like so

    FBBE00003 AGUA 33 CL TP 0,00 216,000 UN 0,17 36,72



    Thank you guys in advance
    Traga2whiskys
    Last edited by traga2whiskys; 11-05-2011 at 04:22 PM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro to sort out if item out of stock

    hi, traga2whiskys, please check attachment, run code "test"
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-26-2011
    Location
    Algarve, Portugal
    MS-Off Ver
    Excel 2019
    Posts
    20

    Re: Macro to sort out if item out of stock

    Watersev

    Thank you very very much... this problem was way out of my league.

    A big thanks again.

    All the best.

  4. #4
    Registered User
    Join Date
    09-26-2011
    Location
    Algarve, Portugal
    MS-Off Ver
    Excel 2019
    Posts
    20

    Re: Macro to sort out if item out of stock

    Waterserv

    Sorry to disturb you again, i just notice that the function is doing the opposite, instead getting from "Setembro" is getting for "Outubro"... how can i change that?

    I was reading all of it, but it is too much info for me.

    Thanks in advance

  5. #5
    Registered User
    Join Date
    09-26-2011
    Location
    Algarve, Portugal
    MS-Off Ver
    Excel 2019
    Posts
    20

    Re: Macro to sort out if item out of stock

    OK i think i maid it.

    I swap this:

    With Sheets("Outubro")
    se = .Range("b15", .Cells(Rows.Count, "b").End(xlUp)).Resize(, 12)
    End With

    With Sheets("Setembro")
    ou = .Range("b15", .Cells(Rows.Count, "b").End(xlUp)).Resize(, 12)
    End With

    And now it is working!

  6. #6
    Registered User
    Join Date
    09-26-2011
    Location
    Algarve, Portugal
    MS-Off Ver
    Excel 2019
    Posts
    20

    Re: Macro to sort out if item out of stock

    Waterserv

    By the way, do you know how i can select one column and tell it to sort by lowest number, or by AZ order, and then it sort automatic the complete row?

    Just picture the sheet your function create, and then lets say i want to sort the Item Name but everything should be sort as the name, otherwise it would be the mess.

    Thanks in advance

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro to sort out if item out of stock

    this would sort A column on the result sheet (added line is underlined):

    Please Login or Register  to view this content.

+ 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