Excel: Copying formulas, keeping column values and increment only their row numbers











up vote
0
down vote

favorite














What I wanted to do is to copy a page to another page (e.g. copy to page 2, page 3 and so on) and keeping the formulas which is linked from another sheet, more like a database for this page. the problem is the page has several formulas and i want to increment only the row numbers of the formulas.



Like This:
Sample Codes from page 1,



Page 1
=AWS_db!$B7, =AWS_db!$C7, =AWS_db!$D7&AWS_db!$E7


I tried using "$" this symbol but it didn't work the way I wanted it to be



This is what I wanted to happen:



Page 2
=AWS_db!$B8, =AWS_db!$C8, =AWS_db!$D8&AWS_db!$E8
Page 3
=AWS_db!$B9, =AWS_db!$C9, =AWS_db!$D9&AWS_db!$E9


and so on



So every time I copy the page to another page I will not have to edit the formulas one by one, I got 1000 rows on the database page so I need 1000 pages










share|improve this question
























  • Could you clarify why you need 1 item per sheet instead of just having all the items on the one sheet? I'm not seeing the use case, and so while I might be able to answer, it might not meet the actual need.
    – JMichael
    Nov 5 at 17:55












  • There's only two work sheets in one workbook, the database: file named AWS_db and the result which is the Water Bill as shown in the picture above. I wanted to create several pages in one worksheet base on the number of rows in the database, the data comes from the same columns A,B,C etc. but different rows 1,2,3 etc. like in 1st page would show data from 1st row, 2nd page 2nd row, 3rd page 3rd row and so on
    – MTO
    2 days ago

















up vote
0
down vote

favorite














What I wanted to do is to copy a page to another page (e.g. copy to page 2, page 3 and so on) and keeping the formulas which is linked from another sheet, more like a database for this page. the problem is the page has several formulas and i want to increment only the row numbers of the formulas.



Like This:
Sample Codes from page 1,



Page 1
=AWS_db!$B7, =AWS_db!$C7, =AWS_db!$D7&AWS_db!$E7


I tried using "$" this symbol but it didn't work the way I wanted it to be



This is what I wanted to happen:



Page 2
=AWS_db!$B8, =AWS_db!$C8, =AWS_db!$D8&AWS_db!$E8
Page 3
=AWS_db!$B9, =AWS_db!$C9, =AWS_db!$D9&AWS_db!$E9


and so on



So every time I copy the page to another page I will not have to edit the formulas one by one, I got 1000 rows on the database page so I need 1000 pages










share|improve this question
























  • Could you clarify why you need 1 item per sheet instead of just having all the items on the one sheet? I'm not seeing the use case, and so while I might be able to answer, it might not meet the actual need.
    – JMichael
    Nov 5 at 17:55












  • There's only two work sheets in one workbook, the database: file named AWS_db and the result which is the Water Bill as shown in the picture above. I wanted to create several pages in one worksheet base on the number of rows in the database, the data comes from the same columns A,B,C etc. but different rows 1,2,3 etc. like in 1st page would show data from 1st row, 2nd page 2nd row, 3rd page 3rd row and so on
    – MTO
    2 days ago















up vote
0
down vote

favorite









up vote
0
down vote

favorite













What I wanted to do is to copy a page to another page (e.g. copy to page 2, page 3 and so on) and keeping the formulas which is linked from another sheet, more like a database for this page. the problem is the page has several formulas and i want to increment only the row numbers of the formulas.



Like This:
Sample Codes from page 1,



Page 1
=AWS_db!$B7, =AWS_db!$C7, =AWS_db!$D7&AWS_db!$E7


I tried using "$" this symbol but it didn't work the way I wanted it to be



This is what I wanted to happen:



Page 2
=AWS_db!$B8, =AWS_db!$C8, =AWS_db!$D8&AWS_db!$E8
Page 3
=AWS_db!$B9, =AWS_db!$C9, =AWS_db!$D9&AWS_db!$E9


and so on



So every time I copy the page to another page I will not have to edit the formulas one by one, I got 1000 rows on the database page so I need 1000 pages










share|improve this question

















What I wanted to do is to copy a page to another page (e.g. copy to page 2, page 3 and so on) and keeping the formulas which is linked from another sheet, more like a database for this page. the problem is the page has several formulas and i want to increment only the row numbers of the formulas.



Like This:
Sample Codes from page 1,



Page 1
=AWS_db!$B7, =AWS_db!$C7, =AWS_db!$D7&AWS_db!$E7


I tried using "$" this symbol but it didn't work the way I wanted it to be



This is what I wanted to happen:



Page 2
=AWS_db!$B8, =AWS_db!$C8, =AWS_db!$D8&AWS_db!$E8
Page 3
=AWS_db!$B9, =AWS_db!$C9, =AWS_db!$D9&AWS_db!$E9


and so on



So every time I copy the page to another page I will not have to edit the formulas one by one, I got 1000 rows on the database page so I need 1000 pages







excel formula






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 5 at 12:55









Imran Malek

1,5001714




1,5001714










asked Nov 5 at 1:51









MTO

11




11












  • Could you clarify why you need 1 item per sheet instead of just having all the items on the one sheet? I'm not seeing the use case, and so while I might be able to answer, it might not meet the actual need.
    – JMichael
    Nov 5 at 17:55












  • There's only two work sheets in one workbook, the database: file named AWS_db and the result which is the Water Bill as shown in the picture above. I wanted to create several pages in one worksheet base on the number of rows in the database, the data comes from the same columns A,B,C etc. but different rows 1,2,3 etc. like in 1st page would show data from 1st row, 2nd page 2nd row, 3rd page 3rd row and so on
    – MTO
    2 days ago




















  • Could you clarify why you need 1 item per sheet instead of just having all the items on the one sheet? I'm not seeing the use case, and so while I might be able to answer, it might not meet the actual need.
    – JMichael
    Nov 5 at 17:55












  • There's only two work sheets in one workbook, the database: file named AWS_db and the result which is the Water Bill as shown in the picture above. I wanted to create several pages in one worksheet base on the number of rows in the database, the data comes from the same columns A,B,C etc. but different rows 1,2,3 etc. like in 1st page would show data from 1st row, 2nd page 2nd row, 3rd page 3rd row and so on
    – MTO
    2 days ago


















Could you clarify why you need 1 item per sheet instead of just having all the items on the one sheet? I'm not seeing the use case, and so while I might be able to answer, it might not meet the actual need.
– JMichael
Nov 5 at 17:55






Could you clarify why you need 1 item per sheet instead of just having all the items on the one sheet? I'm not seeing the use case, and so while I might be able to answer, it might not meet the actual need.
– JMichael
Nov 5 at 17:55














There's only two work sheets in one workbook, the database: file named AWS_db and the result which is the Water Bill as shown in the picture above. I wanted to create several pages in one worksheet base on the number of rows in the database, the data comes from the same columns A,B,C etc. but different rows 1,2,3 etc. like in 1st page would show data from 1st row, 2nd page 2nd row, 3rd page 3rd row and so on
– MTO
2 days ago






There's only two work sheets in one workbook, the database: file named AWS_db and the result which is the Water Bill as shown in the picture above. I wanted to create several pages in one worksheet base on the number of rows in the database, the data comes from the same columns A,B,C etc. but different rows 1,2,3 etc. like in 1st page would show data from 1st row, 2nd page 2nd row, 3rd page 3rd row and so on
– MTO
2 days ago














1 Answer
1






active

oldest

votes

















up vote
0
down vote













The closest you can reliably get to doing this via formula would be to have the following formula in column A, and then copy it into columns B.



=OFFSET(AWSdb!B2, $D$1,0)



Column C would use



=OFFSET(AWSdb!D2, $D$1,0)&OFFSET(AWSdb!E2, $D$1,0)



You'd then put in the appropriate values in D1 to move the right # of rows down for the given sheet.



Another, possibly better, option would be a simple macro. Just record yourself copy/pasting the values to a sheet (plus any other actions you'd want to do like renaming the sheets). Drop that logic inside a Do While loop to iterate through the rows.






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',
    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%2f53147336%2fexcel-copying-formulas-keeping-column-values-and-increment-only-their-row-numb%23new-answer', 'question_page');
    }
    );

    Post as a guest
































    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    The closest you can reliably get to doing this via formula would be to have the following formula in column A, and then copy it into columns B.



    =OFFSET(AWSdb!B2, $D$1,0)



    Column C would use



    =OFFSET(AWSdb!D2, $D$1,0)&OFFSET(AWSdb!E2, $D$1,0)



    You'd then put in the appropriate values in D1 to move the right # of rows down for the given sheet.



    Another, possibly better, option would be a simple macro. Just record yourself copy/pasting the values to a sheet (plus any other actions you'd want to do like renaming the sheets). Drop that logic inside a Do While loop to iterate through the rows.






    share|improve this answer

























      up vote
      0
      down vote













      The closest you can reliably get to doing this via formula would be to have the following formula in column A, and then copy it into columns B.



      =OFFSET(AWSdb!B2, $D$1,0)



      Column C would use



      =OFFSET(AWSdb!D2, $D$1,0)&OFFSET(AWSdb!E2, $D$1,0)



      You'd then put in the appropriate values in D1 to move the right # of rows down for the given sheet.



      Another, possibly better, option would be a simple macro. Just record yourself copy/pasting the values to a sheet (plus any other actions you'd want to do like renaming the sheets). Drop that logic inside a Do While loop to iterate through the rows.






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        The closest you can reliably get to doing this via formula would be to have the following formula in column A, and then copy it into columns B.



        =OFFSET(AWSdb!B2, $D$1,0)



        Column C would use



        =OFFSET(AWSdb!D2, $D$1,0)&OFFSET(AWSdb!E2, $D$1,0)



        You'd then put in the appropriate values in D1 to move the right # of rows down for the given sheet.



        Another, possibly better, option would be a simple macro. Just record yourself copy/pasting the values to a sheet (plus any other actions you'd want to do like renaming the sheets). Drop that logic inside a Do While loop to iterate through the rows.






        share|improve this answer












        The closest you can reliably get to doing this via formula would be to have the following formula in column A, and then copy it into columns B.



        =OFFSET(AWSdb!B2, $D$1,0)



        Column C would use



        =OFFSET(AWSdb!D2, $D$1,0)&OFFSET(AWSdb!E2, $D$1,0)



        You'd then put in the appropriate values in D1 to move the right # of rows down for the given sheet.



        Another, possibly better, option would be a simple macro. Just record yourself copy/pasting the values to a sheet (plus any other actions you'd want to do like renaming the sheets). Drop that logic inside a Do While loop to iterate through the rows.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        JMichael

        461618




        461618






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53147336%2fexcel-copying-formulas-keeping-column-values-and-increment-only-their-row-numb%23new-answer', 'question_page');
            }
            );

            Post as a guest




















































































            這個網誌中的熱門文章

            Xamarin.form Move up view when keyboard appear

            Post-Redirect-Get with Spring WebFlux and Thymeleaf

            Anylogic : not able to use stopDelay()