Move data from cell based off of criteria from another cellVBA code for moving cells from one column to another based on specific cell criteriaPut folder name into a cell based on criteria of another cellCopy data from another worksheet based on cell valuesVBA code for moving cells from one column to another based on specific cell criteriaCopy a set of data multiple times based on criteria on another sheetColoring Cells based on multiple criteriaCopying cell based off criteria - Excel / VBAHi! How can I copy specific rows of data based on criteria and paste those to a new column on the same worksheet with a blank column between themmacro to choose sheet, column, and rows to filter based on cell criteriaCreate a macro that runs another macro based on the value of another cellHow to copy specific cells from one sheet to another meting if criteria

What's the name of the logical fallacy where a debater extends a statement far beyond the original statement to make it true?

The Digit Triangles

How much theory knowledge is actually used while playing?

Is there a nicer/politer/more positive alternative for "negates"?

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

What features enable the Su-25 Frogfoot to operate with such a wide variety of fuels?

How could a planet have erratic days?

Do we have to expect a queue for the shuttle from Watford Junction to Harry Potter Studio?

Does "he squandered his car on drink" sound natural?

Has the laser at Magurele, Romania reached a tenth of the Sun's power?

How can ping know if my host is down

Why is the "ls" command showing permissions of files in a FAT32 partition?

Biological Blimps: Propulsion

US tourist/student visa

How to draw a matrix with arrows in limited space

What is going on with gets(stdin) on the site coderbyte?

Why does Carol not get rid of the Kree symbol on her suit when she changes its colours?

Does Doodling or Improvising on the Piano Have Any Benefits?

What is the English pronunciation of "pain au chocolat"?

What kind of floor tile is this?

How many arrows is an archer expected to fire by the end of the Tyranny of Dragons pair of adventures?

Doesn't the system of the Supreme Court oppose justice?

What is Cash Advance APR?

What to do when eye contact makes your coworker uncomfortable?



Move data from cell based off of criteria from another cell


VBA code for moving cells from one column to another based on specific cell criteriaPut folder name into a cell based on criteria of another cellCopy data from another worksheet based on cell valuesVBA code for moving cells from one column to another based on specific cell criteriaCopy a set of data multiple times based on criteria on another sheetColoring Cells based on multiple criteriaCopying cell based off criteria - Excel / VBAHi! How can I copy specific rows of data based on criteria and paste those to a new column on the same worksheet with a blank column between themmacro to choose sheet, column, and rows to filter based on cell criteriaCreate a macro that runs another macro based on the value of another cellHow to copy specific cells from one sheet to another meting if criteria













0















I am trying create a macro to move cells based off of the criteria of another cell. So basically, in the picture attached, If cell = "PS124" move contents in column "C"to column "B" and if cell = "PS588" move contents in column "C" to Column "A" and continue down all the way to the end of the empty cell.



enter image description here



My apologies for not typing in the code, I don't know the logic for this.










share|improve this question
























  • Is this just a one time thing, or a macro that will be used on a regular basis? It would be nice to know why you are doing this so that a better answer can be provided. I think you may be going down the wrong track with using a macro in the first place.

    – kojow7
    Mar 7 at 5:11












  • @kojow7 this would be used on a regular basis for our nursing invoices. Our data changes constantly as per invoice.

    – jlore
    Mar 7 at 5:27











  • Does my answer below work for you. If not, please explain further.

    – kojow7
    Mar 7 at 5:29











  • @kojow7 I could do that, but i would like it to be automated with a macro. It would still manually have to delete the duplicate value in column C

    – jlore
    Mar 7 at 5:38











  • It's still a bit unclear why you are doing it this way. Why are you putting the values in column C in the first place? Why do you want the values in two separate columns? Is it just so you can get a total? Or is it so you can generate an invoice? You should be able to do both of those with only column C.

    – kojow7
    Mar 7 at 5:49















0















I am trying create a macro to move cells based off of the criteria of another cell. So basically, in the picture attached, If cell = "PS124" move contents in column "C"to column "B" and if cell = "PS588" move contents in column "C" to Column "A" and continue down all the way to the end of the empty cell.



enter image description here



My apologies for not typing in the code, I don't know the logic for this.










share|improve this question
























  • Is this just a one time thing, or a macro that will be used on a regular basis? It would be nice to know why you are doing this so that a better answer can be provided. I think you may be going down the wrong track with using a macro in the first place.

    – kojow7
    Mar 7 at 5:11












  • @kojow7 this would be used on a regular basis for our nursing invoices. Our data changes constantly as per invoice.

    – jlore
    Mar 7 at 5:27











  • Does my answer below work for you. If not, please explain further.

    – kojow7
    Mar 7 at 5:29











  • @kojow7 I could do that, but i would like it to be automated with a macro. It would still manually have to delete the duplicate value in column C

    – jlore
    Mar 7 at 5:38











  • It's still a bit unclear why you are doing it this way. Why are you putting the values in column C in the first place? Why do you want the values in two separate columns? Is it just so you can get a total? Or is it so you can generate an invoice? You should be able to do both of those with only column C.

    – kojow7
    Mar 7 at 5:49













0












0








0








I am trying create a macro to move cells based off of the criteria of another cell. So basically, in the picture attached, If cell = "PS124" move contents in column "C"to column "B" and if cell = "PS588" move contents in column "C" to Column "A" and continue down all the way to the end of the empty cell.



enter image description here



My apologies for not typing in the code, I don't know the logic for this.










share|improve this question
















I am trying create a macro to move cells based off of the criteria of another cell. So basically, in the picture attached, If cell = "PS124" move contents in column "C"to column "B" and if cell = "PS588" move contents in column "C" to Column "A" and continue down all the way to the end of the empty cell.



enter image description here



My apologies for not typing in the code, I don't know the logic for this.







excel vba






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 8:11









Pᴇʜ

24.3k63052




24.3k63052










asked Mar 7 at 5:04









jlorejlore

31




31












  • Is this just a one time thing, or a macro that will be used on a regular basis? It would be nice to know why you are doing this so that a better answer can be provided. I think you may be going down the wrong track with using a macro in the first place.

    – kojow7
    Mar 7 at 5:11












  • @kojow7 this would be used on a regular basis for our nursing invoices. Our data changes constantly as per invoice.

    – jlore
    Mar 7 at 5:27











  • Does my answer below work for you. If not, please explain further.

    – kojow7
    Mar 7 at 5:29











  • @kojow7 I could do that, but i would like it to be automated with a macro. It would still manually have to delete the duplicate value in column C

    – jlore
    Mar 7 at 5:38











  • It's still a bit unclear why you are doing it this way. Why are you putting the values in column C in the first place? Why do you want the values in two separate columns? Is it just so you can get a total? Or is it so you can generate an invoice? You should be able to do both of those with only column C.

    – kojow7
    Mar 7 at 5:49

















  • Is this just a one time thing, or a macro that will be used on a regular basis? It would be nice to know why you are doing this so that a better answer can be provided. I think you may be going down the wrong track with using a macro in the first place.

    – kojow7
    Mar 7 at 5:11












  • @kojow7 this would be used on a regular basis for our nursing invoices. Our data changes constantly as per invoice.

    – jlore
    Mar 7 at 5:27











  • Does my answer below work for you. If not, please explain further.

    – kojow7
    Mar 7 at 5:29











  • @kojow7 I could do that, but i would like it to be automated with a macro. It would still manually have to delete the duplicate value in column C

    – jlore
    Mar 7 at 5:38











  • It's still a bit unclear why you are doing it this way. Why are you putting the values in column C in the first place? Why do you want the values in two separate columns? Is it just so you can get a total? Or is it so you can generate an invoice? You should be able to do both of those with only column C.

    – kojow7
    Mar 7 at 5:49
















Is this just a one time thing, or a macro that will be used on a regular basis? It would be nice to know why you are doing this so that a better answer can be provided. I think you may be going down the wrong track with using a macro in the first place.

– kojow7
Mar 7 at 5:11






Is this just a one time thing, or a macro that will be used on a regular basis? It would be nice to know why you are doing this so that a better answer can be provided. I think you may be going down the wrong track with using a macro in the first place.

– kojow7
Mar 7 at 5:11














@kojow7 this would be used on a regular basis for our nursing invoices. Our data changes constantly as per invoice.

– jlore
Mar 7 at 5:27





@kojow7 this would be used on a regular basis for our nursing invoices. Our data changes constantly as per invoice.

– jlore
Mar 7 at 5:27













Does my answer below work for you. If not, please explain further.

– kojow7
Mar 7 at 5:29





Does my answer below work for you. If not, please explain further.

– kojow7
Mar 7 at 5:29













@kojow7 I could do that, but i would like it to be automated with a macro. It would still manually have to delete the duplicate value in column C

– jlore
Mar 7 at 5:38





@kojow7 I could do that, but i would like it to be automated with a macro. It would still manually have to delete the duplicate value in column C

– jlore
Mar 7 at 5:38













It's still a bit unclear why you are doing it this way. Why are you putting the values in column C in the first place? Why do you want the values in two separate columns? Is it just so you can get a total? Or is it so you can generate an invoice? You should be able to do both of those with only column C.

– kojow7
Mar 7 at 5:49





It's still a bit unclear why you are doing it this way. Why are you putting the values in column C in the first place? Why do you want the values in two separate columns? Is it just so you can get a total? Or is it so you can generate an invoice? You should be able to do both of those with only column C.

– kojow7
Mar 7 at 5:49












1 Answer
1






active

oldest

votes


















0














Instead of the macro approach and instead of moving, I would keep the data in column C and then add the following formulas:



In the cell A3 I would place:



=if(d3 = "PS588", c3, "")


In the cell of B3 I would place:



=if(d3 = "PS124", c3, "")


Then drag the fill handles down to copy the formula into each of the cells in both columns.






share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55036439%2fmove-data-from-cell-based-off-of-criteria-from-another-cell%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Instead of the macro approach and instead of moving, I would keep the data in column C and then add the following formulas:



    In the cell A3 I would place:



    =if(d3 = "PS588", c3, "")


    In the cell of B3 I would place:



    =if(d3 = "PS124", c3, "")


    Then drag the fill handles down to copy the formula into each of the cells in both columns.






    share|improve this answer



























      0














      Instead of the macro approach and instead of moving, I would keep the data in column C and then add the following formulas:



      In the cell A3 I would place:



      =if(d3 = "PS588", c3, "")


      In the cell of B3 I would place:



      =if(d3 = "PS124", c3, "")


      Then drag the fill handles down to copy the formula into each of the cells in both columns.






      share|improve this answer

























        0












        0








        0







        Instead of the macro approach and instead of moving, I would keep the data in column C and then add the following formulas:



        In the cell A3 I would place:



        =if(d3 = "PS588", c3, "")


        In the cell of B3 I would place:



        =if(d3 = "PS124", c3, "")


        Then drag the fill handles down to copy the formula into each of the cells in both columns.






        share|improve this answer













        Instead of the macro approach and instead of moving, I would keep the data in column C and then add the following formulas:



        In the cell A3 I would place:



        =if(d3 = "PS588", c3, "")


        In the cell of B3 I would place:



        =if(d3 = "PS124", c3, "")


        Then drag the fill handles down to copy the formula into each of the cells in both columns.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 7 at 5:14









        kojow7kojow7

        3,17242061




        3,17242061





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55036439%2fmove-data-from-cell-based-off-of-criteria-from-another-cell%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

            Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

            Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved