+ Reply to Thread
Results 1 to 11 of 11

Trying to find a value, if not find first empty cell

  1. #1
    Registered User
    Join Date
    07-24-2017
    Location
    Indiana
    MS-Off Ver
    2013
    Posts
    7

    Question Trying to find a value, if not find first empty cell

    I have a workbook I'm working on for our IT inventory.
    I need it to look for the value of ItemName. If it finds it, move one cell to the right and add the value entered by the user to the existing value in that cell.
    If it doesn't find an equal value for ItemName, I need it to find the first empty cell in column A, then input all 3 values entered by the user:
    ItemName
    Qty
    Location

    I can't get it to go past looking for a duplicate ItemName.
    Link to download the file:
    Here

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Trying to find a value, if not find first empty cell

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    07-24-2017
    Location
    Indiana
    MS-Off Ver
    2013
    Posts
    7

    Re: Trying to find a value, if not find first empty cell

    I have attached the file.
    There is no sensitive data on it, as it is just IT inventory parts, etc.
    What it should do, is when the user clicks on Add Inventory on the Main sheet, is:
    1. Accept the input from the ComboBox's, storing that data into variables: ItemName, Qty, Location
    2. Search the Data Entry sheet for any duplicate of the ItemName
    3. If a duplicate is found, activate that cell, then move 1 cell to the right
    4. Add the value of ExistQty to the value already in that cell
    5. If a duplicate is not found, go to the last empty cell in column A
    6. Input the values of ItemName, Qty, and Location into A:x, B:x, C:x (x being whatever row it's on)
    7. Then return to column A
    Attached Files Attached Files
    Last edited by THDITRick; 07-24-2017 at 05:21 PM.

  4. #4
    Registered User
    Join Date
    07-24-2017
    Location
    Indiana
    MS-Off Ver
    2013
    Posts
    7

    Re: Trying to find a value, if not find first empty cell

    I tried this, but it's not quite doing what it's supposed to:
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Trying to find a value, if not find first empty cell

    I get all that.

    But what if the Cabinet number is not the same as in Column C?

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 07-24-2017 at 06:18 PM.

  6. #6
    Registered User
    Join Date
    07-24-2017
    Location
    Indiana
    MS-Off Ver
    2013
    Posts
    7

    Re: Trying to find a value, if not find first empty cell

    I missed that part of the mess.
    I figured if we just keep adding data to the Data Entry sheet, which is how this was first set up (and working), then the file size would grow out of control.
    It does need to evaluate where the new inventory is going (Cabinet #), so it will need to check. I'm just not sure yet how to format the sheet in order to accommodate that.

  7. #7
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Trying to find a value, if not find first empty cell

    I do not know what you are trying to achieve

    But maybe us a different column for each cabinet.

    Column = Cabinet number +2.

    Or you could use Column C to sum the columns and then Column = Cabinet number +3.

  8. #8
    Registered User
    Join Date
    07-24-2017
    Location
    Indiana
    MS-Off Ver
    2013
    Posts
    7

    Re: Trying to find a value, if not find first empty cell

    I think I'm trying to make this more complicated than it needs to be.
    Since I'm adding the functionality to add new inventory, I guess I just need to search for an existing ItemName.
    But, it still needs to accurately search down column A to find a duplicate for ItemName so it can accurately update the totals.

    And I was just looking at the sheet. Yeah, I need to use a different column for each cabinet. Thank ya!

  9. #9
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Trying to find a value, if not find first empty cell

    Column B is the sum of columns C to K


    Please Login or Register  to view this content.
    Last edited by mehmetcik; 07-25-2017 at 11:28 AM.

  10. #10
    Registered User
    Join Date
    07-24-2017
    Location
    Indiana
    MS-Off Ver
    2013
    Posts
    7

    Re: Trying to find a value, if not find first empty cell

    Thank you, very much. After using your code, I figured out that I wouldn't need the Data Entry sheet. I could just use the Totals sheet for what I had going on with the Data Entry sheet.
    So far, it's working perfectly. But we'll see how it goes after some tries.

  11. #11
    Registered User
    Join Date
    07-24-2017
    Location
    Indiana
    MS-Off Ver
    2013
    Posts
    7

    Re: Trying to find a value, if not find first empty cell

    Well, mehmetcik, everything works like a charm, and much simpler code than I had. Thank you again, so very much.

+ 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. Replies: 5
    Last Post: 05-13-2014, 10:19 AM
  2. Need to find empty filled cells in a column and copy to the empty cell below
    By Grahamfeeley in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-30-2014, 10:09 AM
  3. Find Next Empty Cell
    By zimbo109 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2010, 02:02 PM
  4. Find the next Empty Cell
    By JezLisle in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-14-2008, 04:54 AM
  5. Find 1st empty cell in row?
    By rjmills18 in forum Excel General
    Replies: 11
    Last Post: 07-14-2008, 11:18 AM
  6. Find first empty cell
    By nomadscot in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-10-2007, 05:05 PM
  7. To find empty cell
    By Asu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-03-2005, 01:50 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