+ Reply to Thread
Results 1 to 7 of 7

Unaligned table - cell references not staying lined up

  1. #1
    Registered User
    Join Date
    08-21-2021
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    18

    Unaligned table - cell references not staying lined up

    Hi Everyone,

    I am a uni student working on a large interrelated workbook for my honours thesis.

    I am trying to duplicate and sort tables and am having trouble keeping the rows lining up and displaying data for the same variable (in this case trees as my project is on forestry).

    In the first sheet called "Working" is where the data in the table is referenced too. The second sheet (DBH>30) is displaying a variety of data, and in the "value" column - only showing a value if cells in column c are of a certain size (in this case over 30). The cells here seem to be lined up fine. However, whenever I go to make a duplicate of this sheet (the third sheet - DBH 20-30) and change the formula in column "value" to only show sizes between 20 and 30 I run into the error.

    All I change is the formula in the "value" column from =IF(C6>30,Working!AI6,0) to =IF(AND(C6>=20,C6<=30),Working!AI6,0)

    You can see the difference in cell references between K18 and L18 on the third sheet. Eventually, I would like to be able to sort the third worksheet on descending "value" and then descending "dbhhob".

    I have attached a sample workbook - my real one is 4000 rows long. The first worksheet is quite large, I was going to cut it down but I thought it needed to retain most of the cells because otherwise it wouldn't work to demonstrate the referencing error - sorry.

    I am really appreciative on any assistance you may be able to offer me, thank you :D
    Attached Files Attached Files
    Last edited by exceluniprojecthelp; 08-26-2021 at 04:09 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,618

    Re: Unaligned table - cell references not staying lined up

    Isn't the poblem caused by the fact that while in first sheet you refer to column B (not C as you mentioned) in the second you refer to C (as you described in text) ?
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    08-21-2021
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    18

    Re: Unaligned table - cell references not staying lined up

    Hi Kaper,

    Thanks for your reply. I made that change (sorry I must have overlooked that when duplicating etc.!) but I am still experiencing issues with alignment if you have any more suggestions. Thanks

  4. #4
    Registered User
    Join Date
    08-21-2021
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    18

    Re: Unaligned table - cell references not staying lined up

    Also, if there are any suggestions on how to fix the spill error I would be so appreciative

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,779

    Re: Unaligned table - cell references not staying lined up

    Your COUNTIF formula should be:

    =COUNTIF(K6:K20,"r")

    I don't understand your issue with alignment. Please mock up in the workbook a tab that shows what you want (do this manually).
    Last edited by AliGW; 08-26-2021 at 04:31 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,779

    Re: Unaligned table - cell references not staying lined up

    Waiting for a response ...

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,779

    Re: Unaligned table - cell references not staying lined up

    OK - so a guess, then!

    I used this:

    =INDEX(Working!$B$2:$N$76,MATCH($A6,Working!$A$2:$A$76,0),MATCH(Table2356[[#Headers],[dbhob]],Working!$B$1:$N$1,0))

    and this:

    =IF(AND(B6>=20,B6<=30),INDEX(Working!$B$2:$N$76,MATCH($A6,Working!$A$2:$A$76,0),MATCH(Table2356[[#Headers],[Total FV ($)]],Working!$B$1:$N$1,0)),0)

    on the third tab, where I also changed two of the column heading names to make this work. See if it resolves the issue.
    Attached Files Attached Files
    Last edited by AliGW; 08-26-2021 at 05:04 AM.

+ 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. Rollover text from one multi-lined cell to other cells
    By PrimePorkchop in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-29-2020, 01:49 AM
  2. [SOLVED] VBA Pull Cell References by Matching Data (Table 1 looks into Table 2)
    By sumans054 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-16-2019, 02:29 AM
  3. Values from different columns lined up in one column, in pivot table?
    By dromedar in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-12-2013, 03:00 PM
  4. Formulas not staying as cell value
    By busterbluth123 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-18-2013, 01:49 PM
  5. Excel 2007 : Unaligned data using two y-axes
    By scubadiver007 in forum Excel General
    Replies: 0
    Last Post: 03-05-2012, 07:42 AM
  6. Staying in same cell
    By derekfarr in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 02-27-2011, 05:43 PM
  7. Staying in a cell
    By Bikin'Mike in forum Excel General
    Replies: 1
    Last Post: 08-27-2007, 11:39 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