+ Reply to Thread
Results 1 to 8 of 8

Move specific cells to New Sheet based on Value

  1. #1
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    110

    Lightbulb Move specific cells to New Sheet based on Value

    Hi Guys,

    I have Sheet 2 which will have information

    I would like to create a program that will do the following when button is clicked:

    1. Find cells with value = "Pend" in "Sheet2" Columns: "B", "D" & "F"
    2. Copy cells from "Sheet2" Columns: ("A" + "B"), o ("A"+"D") or ("A"+"F") if "Pend"
    3. Create new sheet "Pending Accounts" Paste starting from Row 2
    4. Change Cells in "Pending Accounts" from "Pend" to
    "Debts" if from (Sheet2, Column "F")
    "Bank" if from (Sheet2, Column "B")
    "Loan" if from (Sheet2, Column "D")

    I have attached an excel with how I want things to look like.
    I have used the code in this thread: http://www.excelforum.com/excel-prog...ell-value.html

    to copy paste to new sheet but I couldn't work out the other stuff I wanted done.

    Here's the code I used to copy paste:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by smartbuyer; 08-05-2013 at 05:58 AM.

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Copy & Paste Specific Column To Last blank cell in New Sheet then Change Cell Value

    Hi,

    As per my understanding if Column B,D & F changed to Pend then only copy that row to Pending Accounts sheet.
    or else
    If column B changed to Pend then that particular A & B row should copy right
    If column D changed to Pend then that particular A & D row should copy right
    If column F changed to Pend then that particular A & F row should copy right
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Copy & Paste Specific Column To Last blank cell in New Sheet then Change Cell Value

    Hi Naveed.

    Thanks for your response.

    Sheet 2 will be updated manually as "Done" or "Pend."
    What I wanted to do is to extract all the properties with "Pend" status into a new sheet but adding them as separate items showing: "Account Name" + Account Type (Bank, Loan, Debts) + Notes

    -----------------------------------------
    IF Columns B, D or F shows "Pend"
    Then copy to "Pending Accounts" as Separate items that is:
    Column "A" + Column "B" + Notes column
    or
    Column "A" + Column "D" + Notes column
    or
    Column "A" + Column "F" + Notes column

    -----------------------------------------
    Every time a Property shows "Pend" program will copy Property Name + "Pend" + Notes column
    then program will change the word "Pend" to "Debts", "Bank" or "Loan"

    "Debts" if Column F shows the word "Pend"
    "Bank" if Column B shows the word "Pend"
    "Loan" if Column D shows the word "Pend"
    -----------------------------------------
    The Pending Property Sheet will be created. I just illustrated the results I would like to see in the attachment.

  4. #4
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Copy & Paste Specific Column To Last blank cell in New Sheet then Change Cell Value

    Found this too. Need help tweaking it so it does what Im looking for which is:

    What I wanted to do is to extract all the properties with "Pend" status into a new sheet ("Pending Properties") but adding them as separate items showing:
    "Account Name" + Account Type (Bank, Loan, Debts) + Notes = from Sheet2
    Sheet 2 will be updated manually as "Done" or "Pend."

    -----------------------------------------------
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by arlu1201; 08-05-2013 at 05:46 AM.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy & Paste Specific Column To Last blank cell in New Sheet then Change Cell Value

    smartbuyer,

    Welcome to the forum.

    I have added code tags to your posts. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. In order to put code tags, either type [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] at the end of it, OR you can highlight your code and click the # icon at the top of your post window.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  6. #6
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Copy & Paste Specific Column To Last blank cell in New Sheet then Change Cell Value

    Noted. Thanks arlu1201

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Move specific cells to New Sheet based on Value

    Try this code
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Move specific cells to New Sheet based on Value

    That is PERFECT! Thanks a bunch arlu1201!

+ 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. Copy valule from one column and then paste only blank cell to other worksheet
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2013, 12:42 PM
  2. [SOLVED] Copy and Paste a specific Column to a Column that's heading matches a particular cell
    By Rexmond in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2012, 12:29 AM
  3. Copy & paste specific column based on cell reference
    By ccsmith in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-26-2011, 03:59 AM
  4. Copy from one sheet and paste into another shee int the blank cell
    By karinos57 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-10-2009, 05:49 AM
  5. find last non blank cell in a column and copy paste in next row
    By prasad_tavva in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2007, 09:41 AM

Tags for this Thread

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