Formula not copying down correctly

Hopefully someone can help, because this is doing my head in.


When I drag down the small icon at the bottom left, it copies all formulas in all columns except 1 column. That column copies the data instead and the little blue triangle appears in the corner of each cell now containing data only.


In the image, the 2 bottom k35 hands should be showing an error as there is no data in the sheet where it's pulling the data from. Instead it's copied the k35 hand from the cell above.


Any help would be much appreciated.

iMac Pro

Posted on Sep 6, 2019 9:48 PM

Reply
46 replies

Sep 6, 2019 11:53 PM in response to Reece89756

"I don't know what the blue triangles mean. "

The blue triangles are 'warning' triangles. They flag one or more warning messages regarding the formula. Warnings are about conditions that won't keep the formula from producing a result.

The red triangles are 'error' triangles. They flag errors that will prevent the formula from working.

Clicking on either type of triangle will reveal the warning(s) or the error that the triangle is flagging.


Click the blue triangle in the bottom row cell displaying 'K35 hand', and you should see the warning message(s) for that cell. In the box at the bottom of the document window, you'll als0 see the formula that has been copied down from the cells above.


Nothing wrong with your nested IF formula. There are done differences from the way I'd write it, but none of them are essential.

  • It could be shortened by renaming "Table 1" on the sheet named "Curtains" to give the Table a name distinct from all other Tables in the document. If only one table in a document has that name, the Sheet name is not necessary, and Numbers will automatically drop it from the cell references in the document.
  • IF you are not filling the same formula left or right into other columns, the absolute reference operators ( $ ) preserving the columns aren't necessary.
  • $R references a range of cells—all of the non-header, non-footer cells in column R and in column D respectively. In many cases like his one, where the comparison operator ( = ) is expecting a single value, not the list of values in all of column R, will detect that and treat the column reference as a reference to the cell on 'this row' of column R. In cses where it doesn't, you'll need to include the row number of the referenced cell as well as the column letter.


I suspect your spreadsheet is working as it is designed to, including the two cells containing warning triangles. The warning message on those cells may explain how K35 hand got into them. My guess is that it was the clisest available value in column R of the referenced column.


Regards,

Barry

Sep 7, 2019 8:24 AM in response to Reece89756

Hi Reece!


I am very impressed with that formula! I suspect one of the reasons your table works a little wonky is Numbers is having to work very hard to parse your formulas. I think that may be the reason it is glitching.


I looks to me like you intend to test the value in column AH for a value G 1 thru G 8 and then return a value from a different cell. I don't see what your IFs return if False. I suspect nothing is designated. It would be easier to parse if I could examine the actual text of the formula. Could you copy and paste it here?


Again, I think the reason for Numbers misbehavior is that it is overburdened with unnessasary calculations and once these formulas are cleaned up things will work more smoothly.


quinn

Sep 7, 2019 7:11 PM in response to t quinn

Hi Reece,


I'd also like to get a text version of that formula to analyze.


To present it here as text:

  • double click the cell containing the formula to open the Formula Editor.
  • Press command-A to select all
  • Press command-C to copy

In a new message here:

  • Click where you want to place the formula
  • Press command-V to paste


Having a text version makes it easier to separate the formula into its parts for a better view of its structure.


Regards,

Barry

Sep 7, 2019 12:01 AM in response to Reece89756

Hi Reece,


The blue triangle is surely a relevant clue. If you click on it it will tell you why it is there. It usually indicates that the formula(!) in the cell is comparing things of differing natures.

=IF(B1>C1,"TRUE","FALSE")


So your formula is still there but we don't know what it is looking at. Double clicking the cell would confirm this.


I don't believe your formula construction follows what might be called "best practices". If I was constructing the formula in the k35 hand column it would have started with Curtains::Table 1::$R1 and been filled down so at row 96 would read Curtains::Table 1::$R96. While this may not improve the functionality of your spreadsheet (I guess it is working fine for you), it will remove the ambiguity as to where the cell contents are coming from.


quinn


Sep 8, 2019 8:32 AM in response to Reece89756

Oh man, the forum did not take my informative and concise post. Let me reconstruct.


"The formula contains an invalad reference" suggests that it is looking for an address that doesn't exist. This would be easier for you to debug on your Mac. Clicking the ADDRESS function would show Function Result at the bottom of your window.


It is looking for a table with the name found in AH5 in the sheet (tab) named "Roman". Do you have those? I suspect the MATCH formulas are not retuning anything useful as they are searching the G 2 area of the Romans table.


The formula on my machine returns Roman::G-1::E5. Cell E5 in table G-1 on sheet Roman.


Hope this helps, I am off to brunch!


quinn



Sep 7, 2019 4:49 PM in response to Reece89756

I cannot explain why the "K35 Hand" column is doing what it is doing. If there are enough rows in Curtains::Table 1 that the reference is valid, it should result in a "0". If there are not enough rows, it should be an error trianlge for an invalid reference. I am unable to duplicate the problem.


The typical way to construct a long formula like you posted, with a whole bunch of smaller formulas all added together, is to break it up into smaller pieces then add the pieces together. It makes it easier to write, easier to read, and far and away easier to debug. Twenty IF statements would use 21 columns, one for each of the 20 IF statements and one to add up all those columns. Then you hide the 20 columns, leaving visible only the one column that has the result. You could group a few IF statements in each column to reduce the column count, if desired. But you said something about there being 250 formulas and I don't know if that means 250 columns of formulas or something else. If you have 250 columns of formulas, you are just about at the limit for number of columns and will not be able to break the formulas into smaller pieces using this method. Given that each of your IF statements start with" IF($AH=", I wonder if there is a much more concise way to write the entire thing, that would take just the one column, maybe with a separate lookup table.

Sep 7, 2019 9:24 AM in response to t quinn

If you are interested, and you are willing to share the file, your spread sheet could be reworked to simplify it. If you can save it to dropbox (without personal info) and share the link, I would be happy to help with that.


I am also interested in your workflow. How is it that you need to delete rows with such regularity? There should be ways around this.


It may be that quite a few problems can be eliminated by structuring your tables with a data table (or tables) and a report table(s) that gathers the info you need in a simpler form.


quinn



Sep 8, 2019 1:52 AM in response to t quinn

Hi Reece,


A little insomnia here so I am back. I do think the reason for your glitches is the massive load this sheet is putting on the program. You may end up graduating to a database program. In the interests of postponing that day, I am looking to simplify and use what I think of as lower order functions. I used to run a spreadsheet off an iPod that really had a hard time keeping up so I thought a lot about what sort of demand different functions would ask of the program and the machine. I like the smaller tables because it makes Numbers job simpler. Numbers is built to prefer tables to designated areas of larger tables. ADDRESS and INDIRECT are simpler functions than INDEX. I believe there are less calculations involved.


Anyway, I realized there were some things missing from the last formula. It did not take into account the value in BH$1 and it did not address the sheet for the ADDRESS function. The sheet that the G1 table is on is "Roman". It shows up in my "style" column.

=INDIRECT(ADDRESS(MATCH(E2,'G-1'::A,0),MATCH(D2,'G-1'::$1:$1,0),addr-type,addr-style,B2&"::"&C2))×F2


I hope this makes sense to you and offers a way forward to simplify other formulas and tables in your spreadsheet.


I will be interested to hear your reaction.


quinn


Sep 12, 2019 8:28 AM in response to Reece89756

Hi Reece,


From your screenshot I cannot tell where your formula is landing but you should be able to see what value it is picking up and where it should be. I do suggest selecting entire rows and columns rather than the way you are doing it. Again, this simplifies the work you are asking the program and your machine to do.


Get rid of unused rows and columns in your tables. Use your headers. I think that is part of it.


quinn

Sep 6, 2019 10:46 PM in response to Barry

Hi Barry,


I appreciate you taking the time to respond. The formula in k35 hand is very simple. Just a simple reference to another table.


The laundry formula is slightly more complicated as it will return a blank value based on a few different criteria. It's probably long winded to a professional, but it works.


I don't know what the blue triangles mean. I've read conflicting info about them. Some info just says it's because there's a formula in that cell which isn't correct.


Please see images.

Sep 7, 2019 7:45 AM in response to t quinn

Hi Quinn, thank you for taking the time to respond as well. I've been working on my ipad pro which doesn't show what the blue triangles mean. Tomorrow I will get on my imac and check it out. Thank you both for explaining the blue triangles to me. As far as my formula goes, I had to reference the entire column rather than each cell which would auto fill down, due to the fact that sometimes we delete entire rows in the curtain table. This would through out errors on the order table. If I'm missing something I would love to know.


There is roughly 250 formulas, some single formulas are 20 lines deep and the only way I could get them to work seamlessly when deleting rows was to reference the entire column.


To give you an idea of what I'm working with. Here is an image of a single formula in 1 cell.

Sep 7, 2019 7:54 PM in response to t quinn

Hi Quinn,


I've spent around 2.5 years working on this and self teaching myself numbers. I'm aware that some things are not the best and as I learn something new I try to incorporate it. I originally had this with separate columns and ran out. It actually calculates around 45 different custom products that all have around 8 different pricing groups each plus custom add ons like motorisation, side channels, bends, remotes, timers, head boxes etc. My brother worked for our biggest competitor and says that what I've created is superior to what they use. I've also trialled software on the market that doesn't come close to what I've created. In saying that I'm not comfortable sharing this with anyone 😢.


As far as work flow goes, we do residential / commercial blinds and curtains. Sometimes we will quote 1000's of items from plans, but when it comes to a site measure we remove multiple products, or the client for budget reasons, might remove all curtains from the foyer etc


IF($AH="G 1",INDEX(Romans::$AY$23:$BK$37,MATCH($'Drop rounded Roman / Roller ',Romans::$AX$23:$AX$37,0),MATCH($'Width rounded Roman / Roller ',Romans::$AY$22:$BK$22,0)))×BH$1+IF($AH="G 2",INDEX(Romans::$C$4:$O$18,MATCH($'Drop rounded Roman / Roller ',Romans::$B$4:$B$18,0),MATCH($'Width rounded Roman / Roller ',Romans::$C$3:$O$3,0)))×BH$1+IF(AH="G 3",INDEX(Romans::$C$23:$O$37,MATCH($'Drop rounded Roman / Roller ',Romans::$B$23:$B$37,0),MATCH($'Width rounded Roman / Roller ',Romans::C$22:O$22,)))×BH$1+IF(AH="G 4",INDEX(Romans::$S$4:$AE$18,MATCH($'Drop rounded Roman / Roller ',Romans::$R$4:$R$18,0),MATCH($'Width rounded Roman / Roller ',Romans::$S$3:$AE$3,0)))×BH$1+IF(AH="G 5",INDEX(Romans::$S$23:$AE$37,MATCH($'Drop rounded Roman / Roller ',Romans::$R$23:$R$37,0),MATCH($'Width rounded Roman / Roller ',Romans::$S$22:$AE$22,0)))×BH$1+IF(AH="G 6",INDEX(Romans::$AI$4:$AU$18,MATCH($'Drop rounded Roman / Roller ',Romans::$AH$4:$AH$18,0),MATCH($'Width rounded Roman / Roller ',Romans::$AI$3:$AU$3,0)))×BH$1+IF(AH="G 7",INDEX(Romans::$AI$23:$AU$37,MATCH($'Drop rounded Roman / Roller ',Romans::$AH$23:$AH$37,0),MATCH($'Width rounded Roman / Roller ',Romans::$AI$22:$AU$22,0)))×BH$1+IF(AH="G 8",INDEX(Romans::$AY$4:$BK$18,MATCH($'Drop rounded Roman / Roller ',Romans::$AX$4:$AX$18,0),MATCH($'Width rounded Roman / Roller ',Romans::$AY$3:$BK$3,0)))×BH$1


Sep 7, 2019 9:30 PM in response to t quinn

Thanks Quinn, it is an addiction of sorts. I'm ocd when I can't figure something out. Once I get it to work, I do a little happy dance inside. Then I start telling my wife and she looks at me like I have some sort of mental issue. Lol


To give you an idea of how much time this saves me. 1 Window of curtains can take around 15 mins to calculate. If they change fabric, it's another 15 mins as each fabric comes in different widths with different pattern repeats and therefore different waste. With this it works in real time with the client. I can toggle different fabrics or tracks (35 different tracks in 7 different configurations = 245 options) and their dimension / fabric costs per metre, and they can see the price difference immediately. In the past we would quote then have to go back and reselect when we were over budget. I have summary which shows total amount of products, total gross profit, grouping so we can check what level 1 is worth of they go ahead in stages. It produces all the orders for over 20 different suppliers. It is an absolute beast of a spreadsheet which is becoming laggy when we enter big jobs. Especially when deleting a row as it recalculates everything below that point. We are at the stage of using a template rather than the actual sheet when doing large jobs from plans, then dropping that info into the working sheet and waiting for it to calculate.



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Formula not copying down correctly

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.