+ Reply to Thread
Results 1 to 9 of 9

fill value in next open spot above

  1. #1
    Forum Contributor
    Join Date
    08-07-2013
    Location
    mo
    MS-Off Ver
    Excel 2010
    Posts
    453

    fill value in next open spot above

    I need to start at D600 and go up D column looking for "St Louis". Once it is located put "GP01" in the next empty cell.


    So if
    D89 = "Atlanta"
    D88 = "St Louis"
    D87 = "Henry"
    D86 = "Vehicle"
    D85 = ""
    D84 = "Canada"

    The D85 would now equal "GP01

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: fill value in next open spot above

    Something like:
    Please Login or Register  to view this content.
    should do it.

  3. #3
    Forum Contributor
    Join Date
    08-07-2013
    Location
    mo
    MS-Off Ver
    Excel 2010
    Posts
    453

    Re: fill value in next open spot above

    That put "GP01" in column, but not in the correct cell. There are going to be several empty cells throught out the range.

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: fill value in next open spot above

    Hi,

    I typed your example into a blank worksheet and the GP01 was inserted into D85.

    Could you upload an example worksheet, for which it does not put it in the correct cell?

    (for reference, the code finds the row with the last occurance of St Louis, moves up to the previous blank cell, and puts GP01 in it).

  5. #5
    Forum Contributor
    Join Date
    08-07-2013
    Location
    mo
    MS-Off Ver
    Excel 2010
    Posts
    453

    Re: fill value in next open spot above

    I copied it into a blank worksheet and tried it and it work. Im sorry. I must of did something incorrect earlier. Thanks for the help

  6. #6
    Forum Contributor
    Join Date
    08-07-2013
    Location
    mo
    MS-Off Ver
    Excel 2010
    Posts
    453

    Re: fill value in next open spot above

    I see what the proble is, If the cell is directly above "St Louis" is blank it will not count that one and go to the next above that. Can I change this somehow to fix that issue. So if

    So if
    D89 = "Atlanta"
    D88 = ""
    D87 = "Henry"
    D86 = ""
    D85 = "St Louis"
    D84 = "Canada"

    The D86 would now equal "GP01"
    It looks like it would currently put it in D88 instead because it doesnt count D86 because it is directly above it

  7. #7
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: fill value in next open spot above

    Please Login or Register  to view this content.
    ?

  8. #8
    Forum Contributor
    Join Date
    08-07-2013
    Location
    mo
    MS-Off Ver
    Excel 2010
    Posts
    453

    Re: fill value in next open spot above

    Thanks for all your help. That worked like a champ.

    If you dont mind, I have one more question. Is there a reason that

    ""St Louis"" will work perfect but
    ""Indianapolis, IN"" wont work.

    Do you think it has to do with the comma?

  9. #9
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: fill value in next open spot above

    I can't see a reason why it would be different to St Louis but I noticed that if the cell below the last entry is blank the method in post #7 doesn't work. Try this:
    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)

Similar Threads

  1. Spot of VBA Help
    By JG025 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-08-2014, 01:40 AM
  2. Fill two text when excel open
    By Vagelisr in forum Excel General
    Replies: 1
    Last Post: 11-17-2013, 03:39 PM
  3. [SOLVED] X Marks the Spot - Fill in table based on 2 criteria
    By Flyinace2000 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-23-2012, 11:15 AM
  4. [SOLVED] Workbook Open fill Listbox
    By zplugger in forum Excel General
    Replies: 4
    Last Post: 08-27-2012, 12:48 PM
  5. Using cell value to open fill and paste into
    By khalid79m in forum Excel General
    Replies: 0
    Last Post: 07-21-2007, 08:07 AM

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