+ Reply to Thread
Results 1 to 8 of 8

Find and update table cell

  1. #1
    Forum Contributor
    Join Date
    04-07-2015
    Location
    Halifax, NS
    MS-Off Ver
    365
    Posts
    100

    Question Find and update table cell

    I have a table of data (tblProducts) that has 27 columns of data. Periodically it will be necessary to update the value of a cell in one specific column (col 7).
    Rather than having users search the table or bother with a userform, I would like them to be able to locate the cell that requires updating from a small area on the dashboard. I have created a data validation list for the products in the database (column 2 on the database sheet (sheet 2). I also created a VLookup to find the current respective value in column 7. (see image below). The macro I have for the submit button is included below but it results in error 13 Type mismatch. I can't find where the error is. Can anyone help?

    Yield.png

    Please Login or Register  to view this content.

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Find and update table cell

    On which line do you get the error ?

  3. #3
    Forum Contributor
    Join Date
    04-07-2015
    Location
    Halifax, NS
    MS-Off Ver
    365
    Posts
    100

    Re: Find and update table cell

    I don't know. It doesn't tell me and doesn't give me the option to go to debug. When I run compile, it shows no error. Is there another way to locate the line?

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Find and update table cell

    To locate the error line put a single quote before On Error Goto ErrHandler
    Try updating with this code.
    Please Login or Register  to view this content.
    Last edited by bakerman2; 04-26-2016 at 04:36 PM.

  5. #5
    Forum Contributor
    Join Date
    04-07-2015
    Location
    Halifax, NS
    MS-Off Ver
    365
    Posts
    100

    Re: Find and update table cell

    Thanks. I didn't know that about commenting out the On Error line. Good thing to know. The error occurred at
    Please Login or Register  to view this content.
    Once I removed that, everything worked great except that I get the same error where I want to clear the values from the dashboard using,
    Please Login or Register  to view this content.
    How can I accomplish this?

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Find and update table cell

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    04-07-2015
    Location
    Halifax, NS
    MS-Off Ver
    365
    Posts
    100

    Re: Find and update table cell

    Perfect!! Thank you so much for your help.

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Find and update table cell

    You're welcome and thanks for the rep.

+ 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. [SOLVED] Update cell value referred to a pivot table
    By pezalmendra in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 12-09-2015, 06:26 PM
  2. [SOLVED] Find date/day across columns and update selective cell below
    By emina002 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-15-2015, 01:08 PM
  3. if then macro to find word and update another cell in row with an assigned number
    By carolinapos in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-19-2014, 07:12 PM
  4. Help with VBA code to find bottom row in pivot table and fill table cell borders
    By Eric111 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-28-2014, 07:15 PM
  5. Writing new record in a table upon the update of a cell or cell range
    By bpopov007 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-08-2014, 02:20 AM
  6. Update table by name, not by cell reference
    By jwhitwell in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-17-2010, 08:49 PM
  7. Date in cell to update upon Pivot Table refresh
    By chris46521 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2006, 06:02 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