+ Reply to Thread
Results 1 to 9 of 9

Find and compare value after filling cell

  1. #1
    Registered User
    Join Date
    09-29-2014
    Location
    brasil
    MS-Off Ver
    ms office 2010
    Posts
    56

    Find and compare value after filling cell

    I need some help.

    I need copare values column A in sheet("Org") with cell A23 in sheet("NET"), case equal, get value in cell A22 ->LEFT(NET!$A$22;7) and fill adjacent cell column A sheet("Org")

    how make it any moment cells change values (using worksheet_change)
    Look my file attachment.

    Ex: B and C and D need filled.

    After code run (Result in sheet("Org")....A20=11,0550, B20=5,8648, C20=7,8808.)

    Part I.
    In A20 sheet("Org") has date 30/09/2014, is equal A23 in sheet("NET"), then in B20 sheet("Org"), receive A22 in sheet("NET") value cell.
    Part II.
    In A20 sheet("Org") has date 30/09/2014, is equal A9 in sheet("NET"), then in C20 sheet("Org"), receive A7 in sheet("NET") value cell.

    Part III.
    In A20 sheet("Org") has date 30/09/2014, is equal A9 in sheet("NET"), then in D20 sheet("Org"), receive A8 in sheet("NET") value cell.


    Cross-Post
    http://www.vbaexpress.com/forum/show...afte-fill-cell

    Thank you!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Find and compare value after filling cell

    There are too many unanswered questions to provide a solution. The data on NET appears to be random. There are two 9/30 dates with a 9/23 thrown in-between. Will it always look exactly like this? The first 9/30 is preceeded by two values that you want in columns C and D, and the second has only one, and it goes in column B. How would the program know this? Why does 9/23 only have one value? What about other dates? It's too vague to be able to help without more information.
    Acts 4:12
    Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.

  3. #3
    Registered User
    Join Date
    09-29-2014
    Location
    brasil
    MS-Off Ver
    ms office 2010
    Posts
    56

    Re: Find and compare value after filling cell

    I try explaining...
    Imagine formulas below in COlumn B, C, D.
    ColumnB=IF(A2=NET!$A$23;LEFT(NET!$A$22;7);0)
    ColumnC=IF(A2=NET!$A$9;LEFT(NET!$A$7;7);0)
    ColumnD=IF(A2=NET!$A$9;LEFT(NET!$A$8;7);0)

    note that today is the 30th of the month September, when looking the next day (01 October), use this formula and the date in column A is other than (NET! $ A $ 23), the value of that cell had become zero .

    My file receives data from the internet every day this data is updated.

    formula to solve, if not for the fact of the value change to Zero when the date changes.

    what I want is to keep these values after the date change!

  4. #4
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Find and compare value after filling cell

    Originally you said you wanted the WorksheetChange event to trigger the update. Which value would be changing? Is it when you enter a new date in column A?

  5. #5
    Registered User
    Join Date
    09-29-2014
    Location
    brasil
    MS-Off Ver
    ms office 2010
    Posts
    56

    Re: Find and compare value after filling cell

    Originally you said you wanted the WorksheetChange event to trigger the update.
    yes, because when any cell in columnA change date, value in clumnB,C,D, not change together formula.


    Att

  6. #6
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Find and compare value after filling cell

    Try this.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-29-2014
    Location
    brasil
    MS-Off Ver
    ms office 2010
    Posts
    56

    Re: Find and compare value after filling cell

    Sorry, i don't know speak englih.........The code has see whal cell columnA has date equal today (in tab Orig).

    If equal today get value in NET and paste adjecent cell columnA.

  8. #8
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Find and compare value after filling cell

    If the value in Net!A9 is today's date, and you enter today's date somewhere in Orig column A, then the code should work.

  9. #9
    Registered User
    Join Date
    09-29-2014
    Location
    brasil
    MS-Off Ver
    ms office 2010
    Posts
    56

    Re: Find and compare value after filling cell

    Ok, i understand!

    Thank you!!

+ 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. compare data and find matches for particular cell value
    By ea223 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-23-2013, 07:48 PM
  2. Compare and find the two different column repeated cell value
    By Duraivel59 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-16-2012, 04:28 PM
  3. How can I find a cell and then compare the time of the one before it?
    By kelemvor in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-24-2011, 11:20 AM
  4. Filling in column based on date compare criteria
    By Mare0929 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-19-2011, 10:22 AM
  5. Find Blank Cell and Compare...
    By deaerator in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2009, 06:58 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