Share via

Automatically copy certain values from one sheet to another

Anonymous
2019-11-26T05:29:14+00:00

I've been setting up an investment portfolio using Excel. I have most of what I want to do with it figured out and am getting most of the data to do what I want. What I'd like to figure out now is how to automatically take "Buy" or "Sell" transactions from the cash balance sheet and have them input onto the investment sheet. This way I can keep the cash transactions (deposits, withdrawals, purchases, sales, etc) separate from the actual increase and decrease of shares and the investment value.  Hopefully, I explained what I want to do well enough.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Anonymous
    2019-12-29T20:21:44+00:00

    Hi,

    You could use the filtering option to filter your list in place based on "buy" and "sell".  This would display only the buy and sell data in the list hiding the rest of the data.  If you absolutely need it on another sheet then a macro would have to be written that cuts and pastes the data into another sheet and then deletes the blank rows from the original list.  This is based on what you have described as your requirements.

    Regards,

    John

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2019-12-29T23:59:03+00:00

    FYI: we all see the all of the replies, so you don't have to "send" the same text to different people.

    .

    Yes, uploading a small example file would help.  Add some descriptive text to explain exactly what you want to do.

    .

    Copying data from one sheet to another is simple enough, a matter of using the right qualification. The question is can we automate it enough for you.

    The format is

           'source tab name'!cell ID

    ie

        SHEET1!a1

    or

        'Sheet 2'!a1 

    you need the quotes if there are spaces in the sheet name.

    You can use that cell reference in formulas, or just display that value in the new location.

    Link Cells Between Sheets and Workbooks In Excel

    https://www.online-tech-tips.com/ms-office-tips/link-cells-between-tabs-and-workbooks-and-in-excel/

    .

    OR!

    .

    if you are moving lots of data from one sheet to another, but you want to apply filter conditions to move only some of the data, and you don't want to move all of the columns, then you may be able to use PowerQuery to automate the process.

    .

    OR!

    .

    Maybe you want to change the logic of your data flow.

    It sounds like you are starting from a balance sheet, going to transactions.  How about starting from the transactions, and moving to a balance sheet reporting the value of the transactions?

    .

    Upload Example - Trouble Shooting - Share Personal OneDrive File (not Business OneDrive)

    .

    Trouble shooting problems in files can be like a visit to the dentist, a long, slow painful process of us trying to “extract” the clues needed to recognize the problem in a back and forth flow of questions and answers so that we can come up with a / “the” solution.

    .

    Often it is faster and easier for everyone if we have a “sample file” get "hands on", to look at, and to “play with”.

    .

    This next link provides some tips on setting up a sample file and specific instructions for uploading and "sharing" it for us to access:

    .

    https://answers.microsoft.com/en-us/windows/forum/windows_other-winapps/trouble-shooting-share-onedrive-file/a231a097-bcbf-4e34-ad6c-a33118baf471

    .

    Includes links to macros to randomize text in Word and numbers in Excel

    .

    The first 2 minutes of this video gives an example of What I mean by a “simple” example. Use short simple names and quantities, and just 2 or 3 rows per sample data you want calculations done on.  You want simple numbers so you can do the math checks in your head.

    Col- **Stacking Columns of Data (Unpivot, Split Columns by delimiter, and everything!)****(PowerQuery)******2017 04 16

    We’ve got headers and a large number of paired columns that need to be condensed down to just 2 columns. 

    .

    **************************************

    .

    Take a look at this free download. You may find a useful technique

    Excel 2016 Linking Worksheets           Pandora Rose Cowart University Of Florida.

    https://www.computer-pdf.com/office/excel/583-tutorial-excel-2016-linking-worksheets.html

    In this workshop we will insert, delete and rename worksheets; change data and formatting on multiple sheets at the same time; link worksheets to create a Totals page; move sheets into different workbook (file); and change the view to see multiple books and sheets at the same time.

    0 comments No comments
  3. Anonymous
    2019-12-29T21:35:28+00:00

    Hi,

    You could use the filtering option to filter your list in place based on "buy" and "sell".  This would display only the buy and sell data in the list hiding the rest of the data.  If you absolutely need it on another sheet then a macro would have to be written that cuts and pastes the data into another sheet and then deletes the blank rows from the original list.  This is based on what you have described as your requirements.

    Regards,

    John

    Thanks; my intent at the time was to have two sheets. One to keep track of the cash transactions in the account and keep an accurate record of how much cash I have available at any time. The second sheet was to keep track specifically of the stocks bought and sold, their values, and how much I have, etc. My thought at the time was that when I marked that I took money from the cash balance to buy stock, that transaction would stay on the cash side but a copy would appear on the investment side detailing the purchase. 

    What I ended up doing was just finding a way to merge the two sheets/tables so that I don't have to worry about it copying the data (and it limits how many sheets are in my workbook, too). I'm willing to show the setup I ended up going with if anybody is interested.

    Thanks!

    0 comments No comments
  4. Anonymous
    2019-12-29T21:30:57+00:00

    Hi there

    Did you check the answers from your previous post on this forum?

    How to highlight/format duplicate cells in a range but only if they match a secondary criteria.

    This question was actually posted long before the other (over a month) and is related to my own personal financing spreadsheet. It had nothing to do with highlighting duplicate values like the newer question that I posted a couple of days ago regarding my work lol.

    What I had intended here was to type a cash transaction onto a cash only balance sheet but have it create a copy of that transaction into a second worksheet for the purchases and sales of stocks on that sheet. What I ended up doing was just merging the two sheets/tables into one and messing with the formulas to keep up with the actual cash balance in the account so that it is accurate and separate from the data that comes out regarding how much of particular stock I own and how much I've invested in them, etc. (I could put a copy of what I did up if anybody is interested).

    0 comments No comments
  5. Anonymous
    2019-12-29T21:17:58+00:00

    Hi there

    Did you check the answers from your previous post on this forum?

    How to highlight/format duplicate cells in a range but only if they match a secondary criteria.

    0 comments No comments