+ Reply to Thread
Results 1 to 8 of 8

Incrementing a Formula by One

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    69

    Incrementing a Formula by One

    Hi there,

    I have an array formula in A1:

    {=IFERROR(INDEX(leave_dates[Status],MATCH(1,([@NAME]=leave_dates[Name])*(VALUE(anuual_leave[[#Headers],[69]])>=leave_dates[Start Date Mod])*(VALUE(anuual_leave[[#Headers],[69]])<=leave_dates[Finish Date Mod]),0),),"")}

    And what I need to do is put this formula into the consequent columns B,C,D,E etc. but as each column moves across I need the "69" number in the formula to increase by one. So the formula in B1 would be as above but with the number 70 instead of 69 and so on.

    I really appreciate your help because I need to copy this formula over to many many columns!

  2. #2
    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: Incrementing a Formula by One

    Try using the COLUMN() function...
    [69+column(A1)]
    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

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Incrementing a Formula by One

    Hi Martin,

    The way to accomplish this is to have a "Columns()" formula involved. In your B Column put this in place of your "69"

    =68+COLUMNS($B:B)

    Then when you drag your formula to the right it will become 70, 71...
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  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: Incrementing a Formula by One

    Another option would be to use COLUMN(BQ1) instead of 69. This will increase as it is copied across

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Incrementing a Formula by One

    I believe you can simple replace this whole reference with the suggested solution.

    VALUE(anuual_leave[[#Headers],[69]])


    There is no need to include the table references when you convert it as value and also using the single Column Header reference

    68+COLUMNS($A:A)


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  6. #6
    Registered User
    Join Date
    10-10-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Incrementing a Formula by One

    Hi Everyone,

    Thanks for all your answers. I should have mentioned initially that I had the column() formula going initially but it doesn't work in this application because it is part of a query and when the query refreshes the cell references were tripping out giving a REF error. So what I am trying to do is create a formula that doesn't have any cell references that way it wont trip out. I was thinking of having maybe some macro way of putting the formula in the consequent columns and incrementing the value. Any ideas?

    Thanks,

  7. #7
    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: Incrementing a Formula by One

    I think its time you showed us a sample workbook of what you are working with, and what you want

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Incrementing a Formula by One

    Quote Originally Posted by martinpgibson View Post
    Thanks for all your answers. I should have mentioned initially that I had the column()
    If I am not wrong using =COLUMN() will never result Error since it will get the current column #.

    Or

    Check whether Indirect() will help you...

    =COLUMN(INDIRECT("A:A"))

+ 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] PLEASE Need Help Incrementing a Formula
    By freefaller6 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-11-2013, 01:51 PM
  2. Incrementing cells with same formula
    By scottw1988 in forum Excel General
    Replies: 1
    Last Post: 10-27-2012, 04:45 PM
  3. Excel 2007 : Incrementing formula
    By savio21 in forum Excel General
    Replies: 5
    Last Post: 04-03-2010, 02:10 PM
  4. Incrementing the end of a formula
    By NJ_Dev in forum Excel General
    Replies: 4
    Last Post: 01-03-2010, 03:56 AM
  5. Incrementing a formula by X number
    By Bowbender in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-21-2005, 11:14 AM

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