+ Reply to Thread
Results 1 to 5 of 5

Continue a vertical pattern on an adjacent column

  1. #1
    Registered User
    Join Date
    04-10-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Continue a vertical pattern on an adjacent column

    Hello,

    I am trying to make printable book labels in one worksheet based off of values from another. The labels that I have are standard address sized and come in sheets with 3 columns and 10 rows. My "label" worksheet has 5 columns (with B:B and D:D as "spacers") I made a "calculation" worksheet that simply runs the equation I want to use for the labels from A1:A1000. On the "label" worksheet, I have this formula in cell A1:

    =IF('Label Calculations'!$A1="","",'Label Calculations'!$A1)

    This way, it won't return 0s for blank cells from the "calculations" worksheet. I dragged down the formula to cell A10, but would like to continue the pattern so that cell C1 would be:

    =IF('Label Calculations'!$A11="","",'Label Calculations'!$A11)

    and cell E1 would be:

    =IF('Label Calculations'!$A21="","",'Label Calculations'!$A21)

    and the pattern would continue with cell A11 with the formula:

    =IF('Label Calculations'!$A31="","",'Label Calculations'!$A31)


    Then cell B11 would be 41, C11 would be 51, A21 would be 61, etc.

    I can do it manually by adding the function in the top row of each "page" (A1,C1,E1 then A11,C11,E11...) and dragging them down each "page." However, I may end up with 20 some pages of labels. I feel like there should be an easier way I can do this. Any thoughts?

    Thanks in advance!

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

    Re: Continue a vertical pattern on an adjacent column

    Put this in cell A1:

    =IF(INDEX('Label Calculations'!$A:$A,MOD(ROWS($1:1)-1,10)+1+INT((ROWS($1:1)-1)/10)*30)="","",INDEX('Label Calculations'!$A:$A,MOD(ROWS($1:1)-1,10)+1+INT((ROWS($1:1)-1)/10)*30))

    Copy the formula into C1 and into E1, then edit the formula slightly so that C1 contains:

    =IF(INDEX('Label Calculations'!$A:$A,MOD(ROWS($1:1)-1,10)+11+INT((ROWS($1:1)-1)/10)*30)="","",INDEX('Label Calculations'!$A:$A,MOD(ROWS($1:1)-1,10)+11+INT((ROWS($1:1)-1)/10)*30))

    and E1 contains:

    =IF(INDEX('Label Calculations'!$A:$A,MOD(ROWS($1:1)-1,10)+21+INT((ROWS($1:1)-1)/10)*30)="","",INDEX('Label Calculations'!$A:$A,MOD(ROWS($1:1)-1,10)+21+INT((ROWS($1:1)-1)/10)*30))

    Then you can copy those formulae down as far as you need to.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    04-10-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Wink Re: Continue a vertical pattern on an adjacent column

    Pete,

    That worked PERFECTLY! Thank you SO much! I guess I need to do some more research on the INDEX function

  4. #4
    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,926

    Re: Continue a vertical pattern on an adjacent column

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, 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.
    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

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

    Re: Continue a vertical pattern on an adjacent column

    Quote Originally Posted by gkostrom View Post
    That worked PERFECTLY! Thank you SO much! ...
    You're welcome - thanks for feeding back.

    Quote Originally Posted by gkostrom View Post
    ... I guess I need to do some more research on the INDEX function
    Actually, it's the MOD and INT functions that do all the work, generating the appropriate numbers to access cells in column A via the INDEX function, so perhaps you should look into those.

    Hope this helps.

    Pete

+ 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] Globally modify non-adjacent worksheet formulas matching a pattern
    By tlafferty in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-10-2012, 02:42 PM
  2. Search /Filter vertical Numeric pattern (down single column)
    By Sam via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-04-2006, 03:51 PM
  3. [SOLVED] Search /Filter vertical Numeric pattern (down single column)
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-07-2006, 01:30 PM
  4. Replies: 4
    Last Post: 04-21-2006, 12:25 PM
  5. [SOLVED] How do I continue this pattern in excel?
    By Greg K. in forum Excel General
    Replies: 11
    Last Post: 09-05-2005, 02:05 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