+ Reply to Thread
Results 1 to 8 of 8

If a cell contains a value - user is moved to a different worksheet Macro

  1. #1
    Registered User
    Join Date
    04-23-2020
    Location
    Plymouth, England
    MS-Off Ver
    Excel 2016
    Posts
    4

    If a cell contains a value - user is moved to a different worksheet Macro

    I'm trying to create a macro where if a cell contain a specific value, the person using the Excel document will be moved to a different worksheet. Can any one help with this?
    Thank you

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: If a cell contains a value - user is moved to a different worksheet Macro

    Hi kingy12321

    Welcome to the Forum...

    I am very certain that this can be achieved, however, we will need a bit more info...
    What action makes this macro run...cell selection, a button, ???
    What do you mean by the person using the Excel document will be moved to a different worksheet...does this mean that different sheet is activated?
    Also...Please upload a sample file with exact setup to explain
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: If a cell contains a value - user is moved to a different worksheet Macro

    Bring up the VBA Editor using Alt+F11 then double-click the "ThisWorkbook" module (on the left) and paste the following:

    Please Login or Register  to view this content.
    Change the constants at the top to represent the sheet names that you're working with, the cell/range you want to check and the value you're looking for.

    WBD
    Attached Files Attached Files
    Office 365 on Windows 11, looking for rep!

  4. #4
    Registered User
    Join Date
    04-23-2020
    Location
    Plymouth, England
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: If a cell contains a value - user is moved to a different worksheet Macro

    This is perfect! Thank you for your help

  5. #5
    Registered User
    Join Date
    04-23-2020
    Location
    Plymouth, England
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: If a cell contains a value - user is moved to a different worksheet Macro

    Is there a way I can implement this in with a button, so when the button activates a formula to display "Y" it will change the worksheet?
    Thank you again for your time and help

  6. #6
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: If a cell contains a value - user is moved to a different worksheet Macro

    I'm not quite sure what you mean? Buttons don't activate formulas? Could you explain in a bit more detail?

    WBD

  7. #7
    Registered User
    Join Date
    04-23-2020
    Location
    Plymouth, England
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: If a cell contains a value - user is moved to a different worksheet Macro

    Im unable to uuplaod an the excel sheet to explain sorry.

    If "A1 + B1 = C1" IF "C1= 10" move user to "sheet 2".
    thank you for your help.
    Last edited by kingy12321; 04-24-2020 at 05:25 AM.

  8. #8
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: If a cell contains a value - user is moved to a different worksheet Macro

    That would be like this:

    Please Login or Register  to view this content.
    WBD

+ 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. Moved Worksheet Not Recognizing Cell Names
    By MattG in forum Excel General
    Replies: 5
    Last Post: 10-04-2016, 04:30 PM
  2. Macro that moves data when a corresponding cell is moved
    By asc29 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2015, 02:37 PM
  3. Replies: 5
    Last Post: 11-10-2014, 11:49 PM
  4. How to protect shapes from being inadvertently moved by user
    By faraoosiris in forum Excel General
    Replies: 2
    Last Post: 02-18-2014, 07:56 AM
  5. Macro to move entire row if cell contains a specific word and moved to sheet 2
    By Astarte in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-12-2011, 09:21 AM
  6. Macro Error when moved Xcel Sheets from User's Home Dir to Networ
    By Basheer in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 04-29-2005, 12:06 PM
  7. Moved code from worksheet to module
    By Phil Floyd in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-23-2005, 05:06 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