+ Reply to Thread
Results 1 to 13 of 13

Copy formula to below cell

  1. #1
    Forum Contributor
    Join Date
    02-23-2013
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    130

    Question Copy formula to below cell

    Hi All,

    I want copy formula to many cells..

    my formula looks something like this..

    Please Login or Register  to view this content.
    if i copy the above formula to cell below it, then it will take it as shown below

    Please Login or Register  to view this content.
    Similarly for all below cell if i keep on copying it ll take A3,A4,A5 etc..

    But my requirement is, it should take B1,C1,D1 etc after A1..

    is it possible or should i manually add formula to each and every cell?

    Thank you.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Copy formula to below cell

    Hi szpt9m,

    Firstly, you are taking sum of just one cell.. so the result would always be the same as it is there in that cell. Better do copy paste special transpose
    Also, Indirect function can work but -1) Text.xlsx should be open for indirect function to work as it doesn't work on closed workbooks 2) you need to have A,B,C etc already present in a column so that you can reference them in indirect function.


    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Contributor
    Join Date
    02-23-2013
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    130

    Re: Copy formula to below cell

    Quote Originally Posted by dilipandey View Post
    Hi szpt9m,

    Firstly, you are taking sum of just one cell.. so the result would always be the same as it is there in that cell. Better do copy paste special transpose
    Also, Indirect function can work but -1) Text.xlsx should be open for indirect function to work as it doesn't work on closed workbooks 2) you need to have A,B,C etc already present in a column so that you can reference them in indirect function.


    Regards,
    DILIPandey
    <click on below * if this helps>
    Sorry.. it was my mistake.. its not SUM.. it just the value of that cell i want.. it will be something like this..

    Please Login or Register  to view this content.
    And Test.xlsx cant be opened always.. i want the values to be fetched even if it is closed... if i copy the formula to each cell then it will work.. but i have lot of cells where i need to copy this formula.. so if i try to copy it will take A2,A3,etc but i want it to take B1,C1 etc..

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Copy formula to below cell

    Give a try to this...

    =INDEX('C:\[Test.xlsx]Sheet1'!$1:$1;ROW(A1))

    Copy down.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Forum Contributor
    Join Date
    02-23-2013
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    130

    Re: Copy formula to below cell

    Quote Originally Posted by Fotis1991 View Post
    Give a try to this...

    =INDEX('C:\[Test.xlsx]Sheet1'!$1:$1;ROW(A1))

    Copy down.
    Nopes.. if i copy down it will take A2 A3 A4 but i want it to take B1 C1 D1 and so on

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Copy formula to below cell

    .....................................
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    02-23-2013
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    130

    Re: Copy formula to below cell

    Quote Originally Posted by Fotis1991 View Post
    .....................................
    looks good... is there any check i can add before copying the formula? like, if any cell is empty in row(A1) the corresponding cell inr result should also empty..right now in your excel file.. if i remove value in C1 which 3.. the corresponding value in reslut which is C6 shows 0.. i want it to be empty as well.. is it possible??

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Copy formula to below cell

    Try

    =IF(INDEX($1:$1,ROW(A1))=0,"",(INDEX($1:$1,ROW(A1))))

  9. #9
    Forum Contributor
    Join Date
    02-23-2013
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    130

    Re: Copy formula to below cell

    Quote Originally Posted by Fotis1991 View Post
    Try

    =IF(INDEX($1:$1,ROW(A1))=0,"",(INDEX($1:$1,ROW(A1))))
    Thanks a ton.. its working :t

  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Copy formula to below cell

    .......................

  11. #11
    Forum Contributor
    Join Date
    02-23-2013
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    130

    Re: Copy formula to below cell

    Hi One small problem with the formula which you gave..!

    everything is working except one small issue..

    if the value of the cell is zero, then it should put the same value in the resultant cell but instead it is putting blank cell..

    only if the value is blank(negatives not allowed) then i need to use blank cell otherwise whatever the value is there in the cell i need to use the same value in my resultant cell.. pls help

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Copy formula to below cell

    =if(index($1:$1,row(a1))<0,"",(index($1:$1,row(a1))))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  13. #13
    Forum Contributor
    Join Date
    02-23-2013
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    130

    Re: Copy formula to below cell

    Quote Originally Posted by FDibbins View Post
    =if(index($1:$1,row(a1))<0,"",(index($1:$1,row(a1))))
    Nopes this is putting zero if there is any blank cell!!

    Below formula is somewhat working for me!!

    Please Login or Register  to view this content.
    Thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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