+ Reply to Thread
Results 1 to 4 of 4

Formula using pattern

  1. #1
    Registered User
    Join Date
    04-02-2013
    Location
    Brasil
    MS-Off Ver
    Office 2016 Professional Plus
    Posts
    4

    Formula using pattern

    Hey guys!

    I need a formula that skips a given number of columns when referencing the cells I need. Let's consider the following formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This is the base formula I need. The next cell must be:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and the next one:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and so on...

    But, obviously, if I click and drag the formula doesn't follow this pattern, and I need it to be applied to multiple cells in a row, otherwise I could do it manually instead. That's when I came across the INDIRECT function that I saw here: excel.tips.net/T003067_Copying_Formulas_using_a_Pattern.html
    I understand that I should use the function COLUMN instead of ROW that he used in the example, but I have no idea how to write the formula combining the INDIRECT function with IF without getting an error

    Does anyone have a clue about that?
    Last edited by Alex Braga; 01-15-2019 at 01:18 PM.

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

    Re: Formula using pattern

    Do you have a row of headers in both sheets that you could use to determine which column to return data from? If so, it would be relatively easy using INDEX/MATCH, without having to use the volatile INDIRECT function.

    It would help if you attached a sample Excel workbook.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post. Don't try to use the Paperclip icon, as it doesn't work on this forum.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    04-02-2013
    Location
    Brasil
    MS-Off Ver
    Office 2016 Professional Plus
    Posts
    4

    Re: Formula using pattern

    Here's the sample .xlsx file attached

    The initial formula is written on B16 from the first sheet. It should follow the row to C16, D16, (...), always moving 3 columns to the right on the first parameter of the IF function and 4 to the right on the second and so on, just like I showed on my last post
    Attached Files Attached Files

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

    Re: Formula using pattern

    You can use this formula in B16 of the first sheet:

    =IFERROR(INDEX(Anotados!$15:$15,MATCH(B$2,Anotados!$3:$3,0)+1),"")

    You may need to change the commas ( , ) in the formula to semicolons ( ; ), depending on your regional settings. Then you can copy it across as required. If you put some made-up data in the second sheet, so that you have some different numbers in the totals on row 15, then you will see the effect.

    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. Continuing a pattern on autofil without pattern re-starting
    By jakeyoung111 in forum Excel General
    Replies: 4
    Last Post: 06-22-2016, 11:11 AM
  2. [SOLVED] Lookup and return rows based on pattern start and pattern end
    By JDI in forum Excel General
    Replies: 18
    Last Post: 11-16-2014, 11:44 PM
  3. [SOLVED] formula with a pattern - how to?
    By mbeekvelt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-23-2014, 04:29 AM
  4. Copy down hypertext cell range pattern & cell reference formula pattern
    By Underexcelling in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-10-2014, 03:23 AM
  5. [SOLVED] IF formula pattern
    By blaugrana9 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-28-2013, 09:33 AM
  6. [SOLVED] Pattern Formula?
    By sixwest in forum Excel General
    Replies: 3
    Last Post: 09-13-2005, 12:05 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