+ Reply to Thread
Results 1 to 6 of 6

Searching for a value/word in workbook, then changing an offset cell based on a criteria.

  1. #1
    Registered User
    Join Date
    06-19-2014
    Location
    Copenhagen
    MS-Off Ver
    2010
    Posts
    2

    Question Searching for a value/word in workbook, then changing an offset cell based on a criteria.

    Hello dear fellow forum folk!

    I am new to these forums so please be gentle :-)

    I need some help creating a macro that does the following:

    Firstly I need it to search the entire workbook for a certain word. When this word has been found the macro should then check if the cell above it equals another certain word (in my case "Salaries"), and if this is true then change the value/word of the first cell to something else (in my case "Social Securities"). If this is not the case then just continue throughout the workbook. The word can appear several time in each sheet, but it isn't always needed to change the value of the cell.

    I've been trying to hatch patch a macro myself, and I've gotten it to find the word but then I got kind of stuck. Currently it's working but when i try and add things, it just isn't running correctly. Hope someone out there has an idea :-)

    Here is my hatch patch macro:
    Please Login or Register  to view this content.
    Last edited by Schaltz; 06-19-2014 at 09:55 AM.

  2. #2
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: Help needed creating a macro.

    You will get a post stating you are breaking one of the rules with such a vague heading.

    Please amend and be more specific (I think it can be done under "Thread Tools".

  3. #3
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: Help needed creating a macro.

    I'd work along the lines of

    Please Login or Register  to view this content.
    Last edited by Sc0tt1e; 06-19-2014 at 09:59 AM.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Searching for a value/word in workbook, then changing an offset cell based on a criter

    post deleted, Fotis beat me to it

    I have added code tags for both, please use them ion future
    Last edited by FDibbins; 06-19-2014 at 09:56 AM.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    06-19-2014
    Location
    Copenhagen
    MS-Off Ver
    2010
    Posts
    2

    Re: Searching for a value/word in workbook, then changing an offset cell based on a criter

    Apologies for not reading the rules. This will not happen again.

    Thanks for adding the code tags Fotis1991. I also changed the title to attempt a more appropriate title.

    I will try and use the code you posted sc0tt1e thanks

  6. #6
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: Searching for a value/word in workbook, then changing an offset cell based on a criter

    Lol, oh the irony

    Apologies, saw an error or two and reposted overwriting the tags, won't happen again boss

+ 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. help needed in creating formulas
    By p.bhaskar in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-28-2013, 11:34 PM
  2. Replies: 1
    Last Post: 05-03-2012, 10:50 AM
  3. Help needed (creating VBA macro to retrieve stock info)
    By L80n in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-21-2012, 08:23 PM
  4. Help needed creating a "Next" macro to scroll through columns
    By spikerules in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-09-2011, 05:54 PM
  5. [SOLVED] Help Needed Creating Hyperlinks from a userform
    By Mark Campbell in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2006, 01:15 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