+ Reply to Thread
Results 1 to 13 of 13

Copy a function to a whole column

  1. #1
    Registered User
    Join Date
    07-14-2023
    Location
    Denmark
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    10

    Copy a function to a whole column

    Hi Guys!

    I do have a simple function in A3 where I look in B3, and if B3 is not empty then A3 will write 1. I will have the same for A4 but it will into B4, and if that is not empty then A4 will write 2, and so on. How do I copy this formula to the whole A column except A1 and A2? I know that I can drag in the small square in the cell of the formula, or dobbelt click on it. If I drag in the small square it will take years to come to the bottom, and if I dobbelt click on that small square, then it will on go to the end of B column where the numbers end. Isn't there a way like A:A for formulas so it knows that it will all the cell in a specific column contains a specific formula?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,739

    Re: Copy a function to a whole column

    If you put your data into a structured table, then the formula in column B will automatically be copied down to the bottom of the table, and if you add more data to the bottom of the table then the formula will also be copied for the new data.

    Let us know what formula you are using.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    07-14-2023
    Location
    Denmark
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    10

    Re: Copy a function to a whole column

    I am not 100% sure that I am understanding what you are meaning about structured table, would it be possible for you to make an example with this formula =if(B3<>"",A2+1), that will be in en entire column A, but not A1 and A2.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Copy a function to a whole column

    Show us on a simple sample Excel file exactly what you want.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

  5. #5
    Registered User
    Join Date
    07-14-2023
    Location
    Denmark
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    10

    Re: Copy a function to a whole column

    Companies.xlsx

    Hi Glenn and Pete

    Hope that I have attached the excel the right way

    As you can see I want to make a counter, every time a add a new company to the B column, when it should count up in column A.
    I know that should can drag in the small square when you writ in a cell or dobbelt click on it, but these two ways do not fill out the whole column A minus A1 and A2.

    How hoped that there where a way, and it sounds that way on Pete's answer, and it is only that do not understand his answer

    BR Nicolai

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Copy a function to a whole column

    Please update your forum profile (there's a typo - 36 should be 365).

    Clear ALL values and formulae from A2 onwards, then in A2:

    =SEQUENCE(COUNTA(B:B),,1,1

    =SEKVENS(TÆLV(B:B);;1;1)
    Attached Files Attached Files
    Last edited by AliGW; 07-17-2023 at 03:24 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,467

    Re: Copy a function to a whole column

    If you need to allow for blank entries in column B, then this in A2 and copied down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,467

    Re: Copy a function to a whole column

    Is this resolved now? If so, please provide some feedback and share the solution you chose.



    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  9. #9
    Registered User
    Join Date
    07-14-2023
    Location
    Denmark
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    10

    Re: Copy a function to a whole column

    It is solved I used AliGW way

  10. #10
    Registered User
    Join Date
    07-14-2023
    Location
    Denmark
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    10

    Re: Copy a function to a whole column

    I thought that it was solved, until I needed to sort in a column because then I got this dialog box
    Attachment 837214

    I want to sort Column B "virksomheder" from A to Z, but how do I do that then I have used SEQUENS?

    Copy of Oversigt over opsigelse.xlsx

    BR
    Nicolai

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,572

    Re: Copy a function to a whole column

    Perhaps this will help.
    1. Paste the following into cell A2: =IF(B2<>"",SUM(A1,1),"")
    2. Press the Ctrl and down arrow keys
    3. Press the Ctrl, Shift and up arrow keys
    4. Press the Ctrl and d keys
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  12. #12
    Registered User
    Join Date
    07-14-2023
    Location
    Denmark
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    10

    Re: Copy a function to a whole column

    #JeteMc thank you very much it works, but now it takes years for the filtration box to open.

  13. #13
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,572

    Re: Copy a function to a whole column

    I imagine that is why Pete recommended a table.
    In the attached file the data is in a table and the formula for column A is: =ROW()-1
    To add another row of data to the select cell C10 and press the Tab key.
    Note that the formula in column F is: =COUNTIF(Table1[Måneders opsigelse],E3)
    Let us know if you have any questions.

+ 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. [SOLVED] Copy function from entire row to column with drag
    By andsalex in forum Excel General
    Replies: 3
    Last Post: 07-01-2021, 06:17 AM
  2. [SOLVED] Best Method to copy a column and modify cells with function.
    By webwyzard in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-07-2018, 12:44 PM
  3. function not macros to copy table column from different sheet
    By JonLanguasco in forum Excel General
    Replies: 1
    Last Post: 07-12-2015, 11:09 PM
  4. function to copy from column a to b
    By ironmonkey888 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2010, 07:07 PM
  5. how to copy function in a column skipping cells
    By sekernicek in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-02-2009, 09:26 AM
  6. copy from one column and paste to another column by (alt + enter) function
    By ccs1981 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-23-2008, 09:24 PM
  7. can't copy a function down a column
    By marcmarc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-20-2006, 11:54 PM

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