+ Reply to Thread
Results 1 to 6 of 6

Fill column according to criteria

  1. #1
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Fill column according to criteria

    Hi.
    In each individual spreadsheet WC (work center), named as 121, 122, etc., must have Excel do the following:


    By accessing the spreadsheet ...

    1 - Sorts the spreadsheet by the column "I" (DT INÍCIO)


    By clicking the "Refresh Dates"

    1 - If the line contains information (columns A: H met), and the "I" is already filled, I want the column "J" (DT CONCLUSÃO) is filled with the calculation result = I + H, rounding up.

    2 - If the line contains information (columns A: H met), and the "I" is empty, so I want the column "I" is filled with the largest data that is in column "J"

    I believe that through a code that has a logic similar to that formula in "K2"
    Attached Files Attached Files
    "No xadrez nem sempre a menor dist?ncia entre dois pontos ? uma linha reta" G. Kasparov.

    If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select b from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  2. #2
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Fill column according to criteria

    Hi
    Any idea?

    Thnak you!!

  3. #3
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Fill column according to criteria

    Hi
    Any idea?

    Thnak you!!

  4. #4
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Fill column according to criteria

    Hi
    someone understood my explanation?

    if necessary I try again

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Fill column according to criteria

    Hi, marreco,

    Code goes behind EstaPasta_de_trabalho (ThisWorkbook) and will exclude three sheets from being considered and act on all other sheets (this is based on the example posted and may be altered if needed):

    Please Login or Register  to view this content.
    This code includes the pressing of the extra button, if you want an extra button it´s the For Next-Loop which should make that up if the upperbound of rows is checked for that.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  6. #6
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Fill column according to criteria

    Hi.
    it was very good!!

    Awesome!!
    Thank you very much!!

+ 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