How to delete cell data upon data entry in Apple Numbers? - macos

I'm trying to make a quick reference sheet for a TTRPG campaign, and I'm trying to create a section of the sheet that will account for leveling up, and by extension, skill points. Since I will not know how the players wish to split skill points, I need a cell equation for inputting x number of points out of y and then adding that input to the appropriate skill. I have that part figured out I believe, but I'm trying to find a way to keep using the cell for various inputs and outputs. Is there some type of "clear cell" function built into numbers or some type of 'for loop' function I could use?
I have been trying to find an answer but all that shows up is just how to clear a cell using the delete key.

Related

Google Sheets: How do I format a range to color a row if every cell in that row has matching data?

I want to make it so if all of the cells in a row has data that matches, it will automatically change the row's fill color to green.
Example of the desired visual effect, including my conditional formatting work-around to achieve the look
As you can see in the image, the rows that have empty cells are not colored green.
Some other functionality I would also appreciate:
Make a row recolor to red if it contains cells that have mismatching data. (such as someone putting their name in someone else's row)
If data is added to a previously empty row, expand the Protected Range by 1 row after 30 minutes.
If a row within a Protected Range becomes empty, the Protected Range automatically sorts itself from A-Z by Column A and reduces its size by 1 row.
Context:
I've recently made a spreadsheet on Google Sheets for my guild in an MMO to track what professions and recipes everyone has, people with the link can perform edits on the sheet, but I do have protected ranges that cover older entries which have their editor access restricted to a small team so random people don't just delete all the data. None of the other officers that regularly maintain the spreadsheets we use have much experience with spreadsheets, which are pretty basic with little automation. It takes three to four of them to do my job when I'm on vacation despite teaching each of them how to maintain the spreadsheets. More automation would be nice for when I go on vacation and eventually retire from that MMO.
This is my first post on this site, I don't know computer programming, not that well-versed with spreadsheets, and trying to google this didn't help since everything I found talked about conditional formatting based on the columns, not the rows.
For now my temporary work-around is to manually add conditional formatting to a range each time I see a row has filled up to change the fill color to green if the cell contains exactly that person's name. Based on prior experience with my guild's other spreadsheets, I know the other officers would not do this themselves.
I'm not sure where to look for help with Google Sheets, but I have a family member that is a developer and I vaguely remember him mentioning this site which is why I'm giving it a shot.
try:
=SUMPRODUCT($A2:$K2<>"")=11
on range A2:K
update:
=(SUMPRODUCT($A2:$R2=$A2)=18)*(A2<>"")
on range A2:R

Is there a way to get a picture box to hold a value in VB?

I'm trying to build a game of battleships for my A level course but in all my projects so far have had to create two different arrays one that holds objects and one that hold different variables in a structure... I was wondering if there was any way to combine picture boxes and structures so they can hold more information than just a picture and location such as (in the case of battle ships) its coordinateds in MY grid(not on the screen) and wether its got a ship in it or not...
Thanks in advance

Determine cause of prolonged "Calculating Formula..." notification

I recently took care of a working data sheet, with about 30 sheets of several thousand rows each sheet, with many cell colored for difference purpose. Most of the sheets only have raw data; a few working sheets have formulas / arrayformulas.
Here's a portion of my workbook:
In the red circle, you can see "Calculating formula....". This appears in my sheet very frequently, generally whenever I edit anything in any cell in any sheet.
I followed https://www.benlcollins.com/spreadsheets/slow-google-sheets/ which doesn't help much to my situation. yeah, all 27 of them.
Now what I want to know is, is there any way to know just what is Google Sheets doing during the time that "Calculating formula..... " bar appear ? So I can see whichever function / formula is taking my precious time and then improve it.
Edit --
Since I cannot share the sheet, at least I'll share the working formula so that you guys can figure what is the sheets doing.
These are to be pasted to get the input data when working. Result will then be value pasted again to data sheet. These formulas are only in the working sheet:
v
=VLOOKUP($D2,TEMP!$A$1:$AT$99,23,FALSE)
=VLOOKUP($D2,TEMP!$A$1:$AT$99,11,FALSE)
=VLOOKUP($D2,TEMP!$A$1:$AT$99,16,FALSE)
=REGEXREPLACE(TO_TEXT(VLOOKUP($D2,TEMP!$A$1:$AT$99,17,FALSE)), "^84", "0")
=VLOOKUP($D2,TEMP!$A$1:$AT$99,46,FALSE)
=VLOOKUP($D2,TEMP!$A$1:$AT$992,18,FALSE)
=CONCATENATE(VLOOKUP($D3,TEMP!$G$1:$AS$492,9,FALSE), ",", VLOOKUP($D3,TEMP!$G$1:$AS$492,10,FALSE), ",", VLOOKUP($D3,TEMP!$G$1:$AS$492,7,FALSE))
=VLOOKUP($D3,TEMP!$G$1:$AS$492,6,FALSE)
=REGEXREPLACE(TO_TEXT(VLOOKUP($D3,TEMP!$G$1:$AS$492,12,FALSE)), "^84", "")
This formula is used to set the status of the data -- only in working sheet:
v
ARRAYFORMULA(IF(ISERROR(MATCH(E7:E10178,DonHangTraVe!A1:A20014,0)),IF(ISERROR(MATCH(D7:D10178,DonHangTraVe!C1:C20014,0)),IF(ISERROR(MATCH(D7:D10178,LAZ_Delivered!B1:B20000,0)),"","Received"),"Returned"), "Lost")))
This formula is placed in all of the data sheets. It will get the value in column E, turn them into links to their corresponding data in the server:
v
=ARRAYFORMULA(IF(ROW(F:F)=1,"LINK", IF(LEN(E:E)=13, HYPERLINK("http://www._____________________?key=" & E:E, E:E), "")))
Those are the main formulas.
There is this one formula in a sheet, but it is turned off by placing a value one cell below. (Not me. I'm still trying to figure this out. Even the sheet maker unsure why he did that)
=ArrayFormula(trim(concatenate(filter(indirect("AQ1:AQ500")&" "&REGEXREPLACE(indirect("AR1:AR500"), "Dòng sản phẩm tương thích:.+",""), indirect("G1:G500")=G1)&CHAR(10))))
I turned the last formula down by setting an if with a switch (Benlcollins idea) but it doesn't help much.
After looking at all the formula, I think maybe the problem of my sheet lie in the arrayformula which adds the link.. I will tinker with it for now.
Still, the question remain.. is there any tool / script / addon that shows what google spreadsheet has been doing under these "Calculating formula..." bar ??
On the side note, this sheet is not using any script, in case you wonder if there's anything in onEdit(e) ..

dc.js heatmap expanding data

I am trying to show machine states over time. Part of this is to reproduce/automate a report that used to be done by hand. It consists of coloring 2minute 'time slices' in Excel based on what the machine is doing.
(Sorry, not enough reputation to post a picture, but it is a classic heatmap where the state drives the color. Some non DC-JS fiddle: http://jsfiddle.net/ww6Lbnc5/4/)
I was able to generate most of what I want in the following jsfiddle:
http://jsfiddle.net/hwhfxz2t/14/
See fiddle for code.
The total state duration (for selected time frame) is shown in the pieChart, followed by the individual state lines and then the heatmap that people are used to. (the ZOOM and date selection buttons do not work in the fiddle but are there to select specific data ranges or zoom in if you like).
The line charts uses the original representation of the states, which consists of a time the state is entered and a duration.
In order to make the heat map work, I had to (I think) take the original data and convert it into individual minute chunks and mark them with a state. So for instance the original data specifying:
RUN state starting 14:30 for 300 seconds
becomes:
14:30=RUN, 14:31=RUN, 14:32=RUN, 14:33=RUN and 14:34=RUN
The code in lines 233-297 loops through the original data and generates a new one that does this. In cases where there is more than one state within a given minute, the last state survives.
This works okay but it seems that this code is exactly what is normally done in group().reduce(add,remove,init). But in this case I need to add multiple timeslots depending on the duration of a state.
Also, because it is now using a different crossfilter, maps do not update each other.
Here are my questions related to this:
Can I display a heatmap without supplying information for all individual
'cells'? (i.e. straddle cells based on a value, similar to rowspan in a table)
Can I add multiple values at once inside group().reduce()?
Is there an easy way to invert the yAxis so 0 is at the top?
When clicking a row in the heatmap, it selects a column and vice-versa?
I'm not sure if this should be in the crossfilter group. If so please ignore my rambling. If someone knows how to keep the charts linked by grouping better, please let me know.
--Nico
Concerning Question 3:
DC.js heatmaps currently do not support custom order functions on axis but there is a pull request that has been merged into the developing branch and should be accessible to the public soon.
You could manually edit the dc.js file to set the sorting in heatmaps to a custom function. In the latest (2.0.0-beta10) version it is the following line:
rowValues.sort(d3.ascending);
and accordingly
colValues.sort(d3.ascending);

Highlight Data Points in Birt Reports

creating simple charts with BIRT is easy, but now I would like to bring some more life to them...
imagine a simple line chart. Let's define as a requirement, that the maximum value should be highlighted. A further requirement would be that if the user clicks on this data point, something happens.
How can I solve this?
I can imagine that I could created a second value series which consists only of the highlighted data points.
But it would be nicer if there was a JavaScript API (or even a server side java api) with which I could loop through the data points and add a highlight on the fly. Is this possible?
I think I've found a good starting point:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/276-birt-chart-scripting-dynamic-markers-and-datapoint-colors/
Now I have to find a way to add on click events to certain data points...

Resources