+ Reply to Thread
Results 1 to 3 of 3

Locate text then change value in that row

  1. #1
    Registered User
    Join Date
    10-17-2019
    Location
    Connecticut, USA
    MS-Off Ver
    2013
    Posts
    2

    Locate text then change value in that row

    I have an inventory list that I want a macro to be able to change values based on the inputs. The inputs are the name of the item and the amount to change the count by. This is operating between 2 sheets.

    Currently I have this line to locate the cell that has the item name C5, and return the 6th column of that row which is the value.

    =CELL("address",INDEX('Master Tool List'!A2:K1000,MATCH('Tool Change'!$C$5,'Master Tool List'!D2:D1000,0),6))

    I now want to increase or decrease the value of that cell by an input number C7, how can I code this in VBA?

    Thanks.
    Last edited by jjamesw97; 10-17-2019 at 03:28 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Locate text then change value in that row

    Hello jjamesw97,

    This macro will increase the value of cell of the ActiveSheet. If these two cells are on a different sheet then Activesheet will have to be replaced with the Worksheets("Sheet Name") where "Sheet Name" is the name of the worksheet you are using.

    Please Login or Register  to view this content.
    Last edited by Leith Ross; 10-17-2019 at 01:23 PM.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    10-17-2019
    Location
    Connecticut, USA
    MS-Off Ver
    2013
    Posts
    2

    Re: Locate text then change value in that row

    Thank you Leith, perfect.

+ 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] Small change to code to Locate Numbers
    By CHRISTINEKENDALL93 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-13-2019, 10:59 AM
  2. Macro to locate certain cells and change data/add rows
    By MacroMe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-09-2017, 09:52 AM
  3. macro to locate locate text string and copy/paste offset range
    By guystanley in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-16-2014, 08:46 PM
  4. Replies: 17
    Last Post: 11-08-2013, 07:22 PM
  5. Using macro to locate certain text, then copy the cell below text into another sheet
    By BobertSama in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-12-2013, 01:32 PM
  6. Locate Member, Change Information
    By nebb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-16-2007, 12:44 PM
  7. [SOLVED] locate and change hidden lines
    By Todd -marietta in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-03-2005, 08:55 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