+ Reply to Thread
Results 1 to 9 of 9

Absolute Referencing Problem

  1. #1
    Registered User
    Join Date
    12-06-2013
    Location
    Swe
    MS-Off Ver
    Excel 2007
    Posts
    26

    Absolute Referencing Problem

    Hi

    Trying to make an absolute reference "not so absolute".
    I need the row count to change after a certain repeats.
    In this example in the attached after 3 times.

    The columns are not consecutive but the rows are.
    So, I want the row to change after repeating the same row 3 times.
    I have 65.000 rows in the sheet so I don't want to copy paste as you could understand.

    rfer.xlsx

    Any help is appreciated.
    Thanks

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Absolute Referencing Problem

    in H2
    =INDEX($B$2:$E$4,QUOTIENT(ROWS($1:1)-1,3)+1,MOD(ROWS($1:1),3)+(MOD(ROWS($1:1),3)=0)*4)
    and copy down
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Absolute Referencing Problem

    Or this

    =IFERROR(INDEX($B$2:$E$4,INT(ROWS(A$1:A3)/3),INDEX({1,2,4},MOD(ROWS(A$1:A3),3)+1)),"")
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    12-06-2013
    Location
    Swe
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Absolute Referencing Problem

    Thanks for replies. Tried the formulas. Is there any way to make them a bit lighter performance wise.
    The number of columns I have is 14 and about 65.000 rows. It kills my CPU.

    I mean they work fine, its just they almost crash my laptop. 2.5ghz i7 8GB RAM

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Absolute Referencing Problem

    I am sorry to hear that. Somehow I just overlooked the part of your post were it says 65,000 rows and went straight for the spreadsheet. IMO, the formulas that were provided for this task all use functions that are least resource-hungry but now we all can agree that 65,000 rows is two much for any formula. Just ran a test on the three columns and 70,000 and 15 min later still waiting on my i3.
    I think a better option would be to pursue a VBA solution.

  6. #6
    Registered User
    Join Date
    12-06-2013
    Location
    Swe
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Absolute Referencing Problem

    Yes I would believe so. I tried to stay away from VBA because i want the sheets to be as "understandable" as possible so a non experienced user
    can change referencing is needed. It has to be flexible, but VBA with instructions would do i guess.

    Can you help me with a Macro to get started, please?

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Absolute Referencing Problem

    Quote Originally Posted by britzer View Post
    Yes I would believe so. I tried to stay away from VBA because i want the sheets to be as "understandable" as possible so a non experienced user
    can change referencing is needed. It has to be flexible, but VBA with instructions would do i guess.

    Can you help me with a Macro to get started, please?
    I did post on the board a request for VBA solution so hopefully someone will jump in to help.

    http://www.excelforum.com/the-water-...ml#post4010743

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,810

    Re: Absolute Referencing Problem

    Does the entire formula need to be in a single cell? I have often observed that some of these "computationally expensive" formulas like this are intensive because we have tried to do the entire formula in a single cell. I think, in many cases, this leads to "duplication of effort" -- each incidence of the formula needs to repeat what the previous incidence of the formula did. Multiply that duplication of effort, and you get processor intensive spreadsheets.

    The way I would tend to do something like this:

    1) Have a column that computes the desired column #. This will usually be something like H3=IF(H2=4,1,H2+1), then copy down. Enter 1 in H2.
    2) Have a column that computes the desired row #. This will usually be something like G3=IF(H2=4,G2+1,G2), then copy down. Enter 1 in G2. You can tie these into the "repeat number" if desired.

    These two columns will then feed into the "row" and "column" arguments of an INDEX() function. I2=INDEX($B$2:$E$40000,H2,G2) copied down.

    Testing this on a 40000 row spreadsheet, and calculation was near instantaneous. Testing on an 80k row spreadsheet, and the calculation event was a couple of seconds. Extending this formula down to near 400k rows (which would capture 120k+ rows of source data) took about 8 seconds.

    Anyway, I guess my point is, if you are willing to separate the computations into multiple simple columns, you may be able to dramatically improve performance without resorting to VBA.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  9. #9
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Absolute Referencing Problem

    Simple macro in your file:

    Please Login or Register  to view this content.



+ 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. Absolute cell referencing
    By ednaw10 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-25-2010, 05:49 PM
  2. Absolute to Relative Referencing
    By sgltaylor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2009, 01:11 AM
  3. Absolute Cell Referencing
    By Rothmans in forum Excel General
    Replies: 4
    Last Post: 01-02-2009, 09:01 AM
  4. [SOLVED] relative en absolute referencing
    By lennert in forum Excel General
    Replies: 4
    Last Post: 02-14-2006, 04:25 PM
  5. Creating a formula using absolute referencing - I think!!
    By Victoria in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-26-2005, 05:06 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