+ Reply to Thread
Results 1 to 21 of 21

Dragging formulas unsystematically

  1. #1
    Registered User
    Join Date
    04-03-2017
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    92

    Dragging formulas unsystematically

    I have a Workbook with two sections of data. The sections called Pay takes the data from the corresponding section called Utilities. So that Pay 1 takes from Utilities 1 and Pay 2 takes from Utilities 2 and so forth. I have only computed the formula from Utitlies 1 into Pay 1, but would like a smart way to do the same for all of the other sections, without doing it manually. I can't just drag the code, as the code would then be shifted.

    Thanks in advance!
    Attached Files Attached Files
    Last edited by Allerdrengen; 02-16-2018 at 09:41 AM.

  2. #2
    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,869

    Re: Dragging formulas unsystematically

    Sorry, I have no idea how what you are asking relates to the data you've provided. You are going to need to give more detail.
    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.

  3. #3
    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,053

    Re: Dragging formulas unsystematically

    Agreed.... an inadequate description. But, always game for a wild guess....

    =IF(LEFT(AD$1,3)="pay","",OFFSET($B2,,3*(COLUMNS($AD:AD)-1)-4*INT((COLUMNS($AD:AD)-1)/4),,))

    in AD2, copied across and down. Also, being in DK, you will probably need ; instead of ,as the separator.
    Attached Files Attached Files
    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

  4. #4
    Registered User
    Join Date
    04-03-2017
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    92

    Re: Dragging formulas unsystematically

    Sorry for the bad explanation and thanks for helping. I have uploaded a more detailed Test WORKBOOK.
    The first section of data stops at column BT. I have computed the code from column BU to column CL (representing January).
    I'd like a clever way to do the same for the next months, and get the corresponding data, so that UID-February (columns CM-DD) gets its data from Utilities February 2018 section. Hope it clears it up!
    Attached Files Attached Files
    Last edited by Allerdrengen; 02-16-2018 at 08:09 AM.

  5. #5
    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,869

    Re: Dragging formulas unsystematically

    Just select everything from BT onwards that relates to January and copy paste to the February section - the cell references will change to suit. If this isn't what you mean, I'm stumped!

    Why does your data need to be laid out in this way? Perhaps if you explain your ultimate aim, we can guide you to a better solution. And the colours need to go, or at least be toned down.

  6. #6
    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,053

    Re: Dragging formulas unsystematically

    Nope. No idea... If you don't make the effort to show us what you want, we won't have clue what you want. There is virtually NOTHING in BU to CL and no indication of what's supposed to happen thereafter.

    I'll play guessing games once, but not endlessly!!!

  7. #7
    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,869

    Re: Dragging formulas unsystematically

    I do not mean this either unkindly or sarcastically, but please remember that we are not mind-readers!

  8. #8
    Registered User
    Join Date
    04-03-2017
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    92

    Re: Dragging formulas unsystematically

    There should be formulas in some of the columns from BU to CL, I have no clue why it doesn't show with you. I'll try looking into it.

  9. #9
    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,869

    Re: Dragging formulas unsystematically

    There are. Did you see post #5?

    That's not the problem. The problem is your (sorry!) very poor attempt at telling and showing us what you want.

  10. #10
    Registered User
    Join Date
    04-03-2017
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    92

    Re: Dragging formulas unsystematically

    Unfortunately this doesn't work. Ill upload another file, with the codes for February so you can see what i mean.
    The layout is not my choice and must be this way, unfortunately. Sorry again.

  11. #11
    Registered User
    Join Date
    04-03-2017
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    92

    Re: Dragging formulas unsystematically

    That was for Glenn Kennedys comment . Yes sorry Ill try again.

  12. #12
    Registered User
    Join Date
    04-03-2017
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    92

    Re: Dragging formulas unsystematically

    Alright. So I've deleted some of the columns to make it simpler. Between the columns with formulas are some blank columns, but thats just to show how the original file is looking.
    I have now put formulas in UID-January (BU-CB) and UID-February (CC-CJ). They both get their values from their respective cells in section "Utilities January 2018 (C-P)" and "Utilities February 2018 (Q-AD)".

    Example for January: Column BY is getting its values from Column L.
    Example for February: Column CG is getting its values from Column Z.
    So for March: Column CO should get its values from Column AN.

    This should be the same for the other Columns in the following months, with their respective formulas. I hope you get the pattern.

    If I just click and drag the cells, the formulas get shifted.

    Thanks!
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    04-03-2017
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    92

    Re: Dragging formulas unsystematically

    And the point is of course, a smart way of following this pattern for the rest of the months, instead of putting it in manually.

  14. #14
    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,869

    Re: Dragging formulas unsystematically

    Don't click and drag - copy and paste, as I advised in post #5.

  15. #15
    Registered User
    Join Date
    04-03-2017
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    92

    Re: Dragging formulas unsystematically

    If I copy and paste the cells are still shifted.

  16. #16
    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,869

    Re: Dragging formulas unsystematically

    OK - so tell us what goes wrong. How about creating a cut-down version of the workbook with just enough data in it to prove that copy and paste isn't working and to show us why.

  17. #17
    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,053

    Re: Dragging formulas unsystematically

    I have made another guess.

    Allerdrengen. It would have helped if you had commented on the possible solution that I offered waaay back at Post 3... It would have given me some indication that I was/was not on the right track.

    I have assumed that what you want are columns BY, CG, CO, etc, populated with the data from columns L, Z, AN, etc.

    This formula, in BY3, copied down to BY 20 does that. Then select all of the cells in the range BY3:BY20. Copy. Paste into CG, CO, etc.
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    04-03-2017
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    92

    Re: Dragging formulas unsystematically

    Yes sorry for that.

    And thank you very much! I think thats the solution I was looking for. Can the same formula be used for referencing more than one cells? Ex. if the reference looks like this "=D3+E3+F3+G3+H3", just like in Cell CA3 from my example Workbook.

  19. #19
    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,053

    Re: Dragging formulas unsystematically

    Here's another version. Formulae in BY, CA & CB. Copy BY3 to CB20. Paste into CG3, CO3, etc....
    Attached Files Attached Files

  20. #20
    Registered User
    Join Date
    04-03-2017
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    92

    Re: Dragging formulas unsystematically

    Thank you very much, Ill play around with it!

  21. #21
    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,053

    Re: Dragging formulas unsystematically

    You're welcome.. If you hit a snag, shout. Just make sure that your expected answers are shown, clearly unambiguously!!

+ 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. Dragging formulas
    By Finalfrontier1976 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-20-2016, 10:35 AM
  2. [SOLVED] Dragging Formulas Down
    By hftechno in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-13-2014, 02:01 AM
  3. [SOLVED] Dragging Down Formulas
    By mphillips in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-03-2014, 02:00 PM
  4. Excel 2007 : Dragging formulas down
    By mkmed in forum Excel General
    Replies: 8
    Last Post: 06-15-2010, 12:33 PM
  5. Dragging formulas down
    By brian1129 in forum Excel General
    Replies: 1
    Last Post: 10-23-2008, 01:21 PM
  6. Excel 2007 : Dragging Formulas Down???
    By Jordan-Circle in forum Excel General
    Replies: 2
    Last Post: 10-15-2008, 03:47 PM
  7. dragging formulas
    By rmarks in forum Excel General
    Replies: 5
    Last Post: 11-18-2005, 07:44 PM

Tags for this Thread

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