+ Reply to Thread
Results 1 to 17 of 17

Auto Fill Row based on value and auto delete shift cell up based on value too

  1. #1
    Registered User
    Join Date
    03-03-2017
    Location
    indonesia
    MS-Off Ver
    2007
    Posts
    10

    Auto Fill Row based on value and auto delete shift cell up based on value too

    Hi,
    I'm new in Vba.
    I have a question how if I want to Auto Fill Row based on cell value and auto delete shift cell up based on cell value too.
    can anyone help me?
    thanks before
    Attached Files Attached Files
    Last edited by morr1; 03-14-2017 at 06:53 PM. Reason: Not solved yet

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    Hi morr1

    Welcome to the Forum!!!

    Try replacing your Command Button Code with this...
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    03-03-2017
    Location
    indonesia
    MS-Off Ver
    2007
    Posts
    10

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    Hi John,many thanks for your help.
    your code work for delete shift cell up.
    but your code for auto fill value is work in too many cell.
    i just hope auto fill only work for the last row based on coloumn F or coloumn H (wich one have more last row)
    i apreciate that you can help me again.
    thanks

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    Hi morr1

    The Code worked as I expected on the test file. Apparently it does not work as you expect.
    So, if you will, please attach the offending file...with code and expected results...I'll look at it.

  5. #5
    Registered User
    Join Date
    03-03-2017
    Location
    indonesia
    MS-Off Ver
    2007
    Posts
    10

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    Im sorry john or jaslake.
    Code work perfectly.
    It's my fault not delete text on sample file.
    Inside box "hope".
    Thanks again for your help john or jaslake.

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    Hi morr1

    It's John...I suspected there was an outlier in the File such that Last Row was being distorted...glad you got it resolved.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    You're welcome...glad I could help. If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  7. #7
    Registered User
    Join Date
    03-03-2017
    Location
    indonesia
    MS-Off Ver
    2007
    Posts
    10

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    Sorry john.
    I want to ask again.
    Why if i change my date.
    Its always copy from A2.
    And when I entry reject in another day.
    That reject become going up to yesterday row.
    I really confuse to try.
    Can you help me again please.
    Last edited by morr1; 03-13-2017 at 11:29 PM.

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    Morr1...I have no idea what you're referring to...SHOW ME the offending File...EXPLAIN what's happening. If I can see it and duplicate it perhaps we can fix it...maybe...

  9. #9
    Registered User
    Join Date
    03-03-2017
    Location
    indonesia
    MS-Off Ver
    2007
    Posts
    10

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    Ok John.
    This is my document.
    Attached Files Attached Files
    Last edited by morr1; 03-13-2017 at 11:29 PM.

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    Hi morr1

    Try this Code in the attached...let me know.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    03-03-2017
    Location
    indonesia
    MS-Off Ver
    2007
    Posts
    10

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    there is something strange if I Fill Blank 2 value, in coloumn F or H.
    if only 1 value blank,its perfect delete the cell and beside that cell.
    but if there are 2 value blank its still remain one cell and beside that cell not delete.

  12. #12
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    Hi morr1

    You'll need to show me...I don't "see" it from your description.

  13. #13
    Registered User
    Join Date
    03-03-2017
    Location
    indonesia
    MS-Off Ver
    2007
    Posts
    10

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    it look the code for delete can't work twice or more
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    03-03-2017
    Location
    indonesia
    MS-Off Ver
    2007
    Posts
    10

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    With ws2
    LR = .Range("E" & .Rows.Count).End(xlUp).Row
    For Each cel In .Range("E" & NextRow & ":E" & LR)
    If cel.Offset(0, 1).Value = "" Then
    .Range(cel.Address).Resize(1, 2).Delete Shift:=xlUp
    End If
    Next cel


    is this code can be loop until cel.Offset(0, 1).Value >0 ?

  15. #15
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    Hi Morr1

    Let's try it one more time with this Code...
    Please Login or Register  to view this content.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    03-03-2017
    Location
    indonesia
    MS-Off Ver
    2007
    Posts
    10

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    wow.
    you did it John.
    many many big thanks for your help.
    I hope someday i can be like you in vba.
    thanks again and see u

  17. #17
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Auto Fill Row based on value and auto delete shift cell up based on value too

    You're welcome...glad I could help. Thanks for the Rep.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. Auto Fill 6 cells based of of text in one other cell
    By Ksilvan0418 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2014, 05:13 PM
  2. auto fill cells based on 1st cell
    By teagranny in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-03-2014, 09:36 AM
  3. VBA auto fill cell based on text above it
    By adamheon in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-19-2014, 11:22 AM
  4. [SOLVED] Auto copy fill based cell match?
    By synses in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-31-2013, 04:12 PM
  5. auto fill cells based on value entered in first cell?
    By Synthia in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-29-2010, 08:27 AM
  6. Macro to auto fill rows based on one cell value
    By jennieS in forum Excel General
    Replies: 6
    Last Post: 08-18-2010, 03:10 PM
  7. Auto fill a range based on another cell
    By Ricardo9211 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2009, 04: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