+ Reply to Thread
Results 1 to 29 of 29

Forumla that can be dragged without intervention

  1. #1
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Forumla that can be dragged without intervention

    Hi,

    I have an Excel spreadsheet that contains a worksheet with a row of names in it, however, the names appear every 4th column so for example the 1st name is in cell BE and the next BH, BL and so on.

    I want to create a formula on a another worksheet that creates the same list but without the gaps and one that can be dragged across and updated if a new name is inserted in the 1st worksheet.

    I have tired OFFSET but this does not drag across how I need it to as Excel doesn't know I want it to skip columns.

    Thanks
    MissDB

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

    Re: Forumla that can be dragged without intervention

    Hi there. Try this and copy across.

    =OFFSET(Sheet1!$BE$1,,(COLUMNS($A:A)-1)*3,,)
    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

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Forumla that can be dragged without intervention

    Here's another one...

    =INDEX($BE1:$IV1,COLUMNS($A1:A1)*4-3)

    Adjust for the correct end of range.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Forumla that can be dragged without intervention

    Thank you both very much! Have gone with the OFFSET one for now :-)

    Love this forum!

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

    Re: Forumla that can be dragged without intervention

    Glad to have helped! If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. It'd also be appreciated if you were to click the add Reputation button at the foot of any of the posts of those who helped you reach a solution.

  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,141

    Re: Forumla that can be dragged without intervention

    Thanks!!

    G.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Forumla that can be dragged without intervention

    You're welcome. We appreciate the feedback!

  8. #8
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Forumla that can be dragged without intervention

    Ok, so slightly different formula required now as I need to go down rather than across......I tried to amend the formula myself but cannot get it to work.

    So as before I have names spread out every 4th column but now I need a formula that will translate this down in a column on another sheet.

    So.....Name in BE, BH, BL on sheet 1
    To......Name in A5, A6, A7, A8 etc

    Again so I can drag this formula down and it will update.

    Help greatly appreciated :-)

  9. #9
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Forumla that can be dragged without intervention

    Just change COLUMNS($A:A) to ROWS($1:1)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  10. #10
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Forumla that can be dragged without intervention

    Hi, so this would work?

    So =OFFSET(Sheet1!$BE$1,(ROWS($1:1)-1*3,,)

  11. #11
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Forumla that can be dragged without intervention

    Hi, so this would work?

    So '=OFFSET(Sheet1!$BE$1,(ROWS($1:1)-1*3,,)

    Thank you again!

  12. #12
    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,141

    Re: Forumla that can be dragged without intervention

    Hi there. One comma missing:
    =OFFSET(Sheet1!$BE$1,,(ROWS($1:1)-1)*3,,)

  13. #13
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Forumla that can be dragged without intervention

    Hi,

    I am unable to get this to work have tried the following:-

    =OFFSET(Summary!$BE$16,(ROWS($5:5)-1)*3,,) but it returns a zero. What am I doing wrong please?

    Thanks

  14. #14
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Forumla that can be dragged without intervention

    HI,

    I have tried this:- OFFSET(Sheet1!$BE$1,,(ROWS($5:5)-1)*3,,)

    But it still does not work.

    I have amended so that the Row number is 5 as this is where I want the list of names to start but it does not work. Returns #VALUE.

    tHNAKS

  15. #15
    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,141

    Re: Forumla that can be dragged without intervention

    See post 13 above and try

    =OFFSET(Summary!$BE$16,,(ROWS($5:5)-1)*3,,) but it returns a zero. What am I doing wrong please?

  16. #16
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Forumla that can be dragged without intervention

    Exact formula I am using is:-

    =OFFSET(Summary!$BE$16,,(ROWS($5:5)-1)*3,,)

    Returns a "0"

    Thanks

  17. #17
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Forumla that can be dragged without intervention

    Sorry I was using wrong sheet reference! Such a silly mistake. Thank you for your help!

    :-)

  18. #18
    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,141

    Re: Forumla that can be dragged without intervention

    Ahh. Sorry!!!

    =OFFSET(Summary!$BE$16,,(ROWS($1:1)-1)*3,,)

    The ROWS bit is simply a counter to return 0,3,6,9,12, etc as the formula is dragged down. If you start with 5:5 the first value returned will be 12 cells to the right of BE16...

  19. #19
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Forumla that can be dragged without intervention

    Quote Originally Posted by Glen
    The ROWS bit is simply a counter to return 0,3,6,9,12, etc as the formula is dragged down. If you start with 5:5 the first value returned will be 12 cells to the right of BE16...
    No, it doesn't matter whether you start with ROWS($1:1) or ROWS($5:5)
    ROWS counts the number of rows in your range. Between 1 and 1 there is 1 row, between 5 and 5 there is 1 row. The reason many people like to use ROWS as a counter instead of ROW() (which returns the row number) is for this very reason. If you insert or remove rows from your spreadsheet, the ROWS formula still returns the same value.

  20. #20
    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,141

    Re: Forumla that can be dragged without intervention

    You're correct. I must have my sleepy head on today...

  21. #21
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Forumla that can be dragged without intervention

    Quote Originally Posted by ChemistB View Post
    No, it doesn't matter whether you start with ROWS($1:1) or ROWS($5:5)
    ROWS counts the number of rows in your range. Between 1 and 1 there is 1 row, between 5 and 5 there is 1 row. The reason many people like to use ROWS as a counter instead of ROW() (which returns the row number) is for this very reason. If you insert or remove rows from your spreadsheet, the ROWS formula still returns the same value.
    Correct.

    However, I think it's better (more intuitive) to use the address of the first cell the formula is entered into. For example, if the first formula is entered in B20 and copied down then use ROWS(B$20:B20).

    Also, the INDEX version is a better choice as it is not volatile.

  22. #22
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Forumla that can be dragged without intervention

    Hi,

    This formula has suddenly stopped working!

    One of the cell references has changed but that is i.e. Used to be BE16 now it is BE2.

    The cells I need info from are:- BE2, BH2, BK2, BN2 etc (these are on a tab called Modules)

    And I need this info to appear in cells:- A5, A6, A7, A8 etc (these are on a tab called Summary)

    The formula I have looks like this:-

    =OFFSET(Modules!$BE$2,,(ROWS($5:5)-1)*3,,)

    and the only thing that changes as you move down the rows is ($5:5) which goes as follows:- ($5:6), ($5:7), ($5:8), ($5:8) etc.

    The formula used to pull the correct info but it is now just repeating what is in BE2 and not pulling what is in BE2, BH2, BK2, BN2 etc

    Help! :-)

  23. #23
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Forumla that can be dragged without intervention

    Try this...

    Entered in A5 and copied down:

    =INDEX(Modules!BE$2:IV$2,ROWS(A$5:A5)*3-3+1)

    Adjust for the correct end of range where I use up to IV2.

  24. #24
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Forumla that can be dragged without intervention

    Ok, so, I just walked away from my PC, came back clicked in the start sell i.e. BE2 (which I have already done a number of times today) and then looked away at something and when I looked back the formula was working!?!? Does anyone know how this could happen? I didn't touch the formula! Could it be something to do with automatic vs manual calculation even though it's not "calculating"?

  25. #25
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Forumla that can be dragged without intervention

    Thanks Tony, see my last message. Crazy!

  26. #26
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Forumla that can be dragged without intervention

    The formula used to pull the correct info but it is now just repeating what is in BE2 and not pulling what is in BE2, BH2, BK2, BN2 etc
    That makes it sound like calculation is set to manual.

    Make sure calculation is set to automatic.

    Got the Formulas tab>Calculation Options>Automatic

  27. #27
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Forumla that can be dragged without intervention

    Yeah I thought that too but I it wasn't set to manual.,.....spooky. Thanks for your help though!

  28. #28
    Registered User
    Join Date
    05-04-2015
    Location
    Lao
    MS-Off Ver
    2013
    Posts
    42

    Re: Forumla that can be dragged without intervention

    Can someone explain to what the symbol meaning
    ,, in a middle and be hide
    -1 and *3

    then i can understand how is work.

    Thanks

  29. #29
    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,141

    Re: Forumla that can be dragged without intervention

    In a formula like:

    =OFFSET(Modules!$BE$2,,(ROWS($5:5)-1)*3,,)

    OFFSET has the syntax OFFSET(rows, columns, height,width). The first ,, means that there is no OFFSET applied to the row number and the last ,, means that htere is no change to the height or width.

    This is just a counter. Type =(ROWS($5:5)-1)*3 into a cel and copy it down. You'll see that it increments in 3s from zero. 0, 3, 6, 9, etc. The counter is in the columns section of offset, so every row that you copy the formula down, the value returned is initially what is in BE2 and then from 3 columns to the right, 6 columns to the right, etc.

+ 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. Make forumla lookup value rather than forumla
    By Jbraviator in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-09-2015, 01:00 PM
  2. Conditional Forumla with Forumla assigned- Help needed
    By MarkoPolo in forum Excel General
    Replies: 3
    Last Post: 03-06-2014, 06:46 PM
  3. vb code to select all files from a folder without manual intervention
    By ravivaliya in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 12-08-2009, 04:12 AM
  4. Answer Excel 'yes/no' question in Macro without user intervention?
    By dingman4 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-10-2007, 01:35 PM
  5. Automatic updation of workbook without any manual intervention
    By engrzubair in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-05-2007, 10:31 AM
  6. User Intervention Required When Opening Workbooks
    By Rob Fernando in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-14-2005, 10:05 AM
  7. Replacing a cell's forumla with the forumla's results?
    By Mooncalf in forum Excel General
    Replies: 2
    Last Post: 01-04-2005, 12:35 AM

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