+ Reply to Thread
Results 1 to 7 of 7

checking value in cell and then pasting to a specific worksheet

  1. #1
    Registered User
    Join Date
    09-15-2016
    Location
    london,england
    MS-Off Ver
    2010
    Posts
    4

    checking value in cell and then pasting to a specific worksheet

    hi,


    so here's what I'm attempting to do is to, I need to check a cell to see if the first two characters in that cell match one of three things. once I have checked that I then need to copy that range of cells and then paste it into a specific worksheet. I have been told use InStr and if's to do it but Im struggling to code it. I understand how to copy paste data from one sheet to another but its the checking part im not 100% sure of can anyone help?

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,895

    Re: checking value in cell and then pasting to a specific worksheet

    What cell or range of cells do you need to check and what 3 strings do you need to match? What is the name of the specific sheet and where on that sheet do you want to paste the copied data?
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    09-15-2016
    Location
    london,england
    MS-Off Ver
    2010
    Posts
    4

    Re: checking value in cell and then pasting to a specific worksheet

    so in a worksheet I have a list of staff members that all belong to different companies. each id has 2 letters which need to be checked. the letters are BC , IA and AC. once they have been checked I need to copy the staff id the name of the staff member and the role and place it into the respective worksheet for the company they work for. I have been asked to do this in vba using InStr and if but as im not confident with vba im not sure how to do the checking. tried looking online put got more confused

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,895

    Re: checking value in cell and then pasting to a specific worksheet

    I would need more details to suggest a code that will work for you. In which columns are the staff id's, the names of the staff members and their role? What are the names of the company worksheets?

  5. #5
    Registered User
    Join Date
    09-15-2016
    Location
    london,england
    MS-Off Ver
    2010
    Posts
    4

    Re: checking value in cell and then pasting to a specific worksheet

    staff numbers start from cell b4, staff names start from c4 and roles start from d4. names of the worksheets are Agenda Corporation, Borough Capital and ICN Agency

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,895

    Re: checking value in cell and then pasting to a specific worksheet

    I have to go out for a bit. I'll get back to you as soon as I get back.

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,895

    Re: checking value in cell and then pasting to a specific worksheet

    Try:
    Please Login or Register  to view this content.

+ 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: 1
    Last Post: 06-16-2015, 12:28 PM
  2. Copying a specific range and then pasting into another worksheet
    By FROGMAN59 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-12-2015, 05:38 PM
  3. [SOLVED] Searching cell for text in specific location and pasting result in another cell
    By AWM1966 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-14-2012, 12:02 AM
  4. Macro for checking data in a cell against another cell and copying/pasting data
    By JLP1996 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-12-2012, 03:41 PM
  5. pasting data to a specific cell
    By guerilla in forum Excel General
    Replies: 2
    Last Post: 10-13-2006, 05:44 PM
  6. [SOLVED] Copy and pasting specific sheet data to a master worksheet
    By simora in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-09-2005, 01:06 AM
  7. [SOLVED] Checking specific cell, and identifing how many rows in the sheet
    By Amy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-21-2005, 11:06 AM

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