I have a string grid, but I want to create cells that would be split into 3 "mini" columns within the cell, how would I do this, if it is possible, using FMX delphi?
So essentially in the grid each cell would have 3 columns (1 row), and in each of those columns is a cell.
This string grid would be to represent a calendar/diary planner etc, each of the main cells would be a day in the month, and the mini cells would represent an early/late/night time frame in the day. What I would like to have is the ability to access TStringGrid.Cells[x,y] and then set the columns within that Cell to a certain letter/number. So the cell would be shown as e.g 24 E L N, the 24 if possible could be a header to the main cell.
Related
How to get sum of column labels 15 and 8 of a particular date
Input:
Output: need for all rows
One way is do sum along horizontal yet not sure to match the dates... I have >50K columns in real dataset. sumif along rows link https://exceljet.net/formula/sumifs-with-horizontal-range
you can write this in the cell where you want the result of first row:
=FIRSTCELL + SECONDCELL + THIRDCELL ecc...
where firstcell is like "A3"..
after simply select the cell where you got the result, a dot appears in the lower right of the cell, drag it down, and in the cells below you will get the result of the other rows
Just to preface this is quite a unique ask and I've googled a bunch of times and never seen the combination of these factors being asked before.
Essentially I have 2 sheets. 'Sheet' & 'Sheet2'
'Sheet' has
A1:3
A2:4
A3:8
A4:4
And So on with random amounts for a few hundred cells. I want 'Sheet2' to display the following and allow me to drag it to extrapolate it. The reason it is every nth cell is because those cells are merged (i.e A1-D1 is merged).
A1:('Sheet1'A1) E1:('Sheet1'A2) I1:(Sheet1'A3) M1:('Sheet1'A4)
and so on
I can extrapolate the data with =OFFSET(Sheet!$A1,COLUMN()-1,0) but it skips the missing data on cells A2 & A3 and creates A1:('Sheet1'A1) E1:('Sheet1'A4) instead.
A simple pull-across formula would be
=index(Sheet1!$A:$A,(column()+3)/4)
Or an array formula
=ArrayFormula(vlookup((column(2:2)+3)/4,{row(Sheet1!A:A),Sheet1!A:A},2))
Assuming there are enough merged cells available to hold all the data in sheet 1.
Sheet 1
Sheet 2
Right now I am tasked to compare similar data across 3 columns and its respective rows and then highlight them.
I was wondering whether if it is possible to format the spreadsheet so that the cells highlight on their own across their respective rows when similar data is entered into the cells.
I have attached an example in the link provided !
OK select the range you want to format then go to Format | Conditional format | Add new rule and choose the last option (Custom formula is...) under Format cells if...
Enter the following formula (adjusting range to how many rows and columns you have in your data)
=countifs($A$2:$A$18,$A2,$B$2:$B$18,$B2,$C$2:$C$18,$C2)>1
and choose the fill colour that you want.
The formula counts how many rows there are whose first three columns match the first three columns of the current row. If the result is greater than one, there is a duplicate and the current row should be formatted.
I am usually good with conditional formatting in excel/google sheets, but here is my current challenge. I am needing to format specific cells based on the data in a table at the top of the sheet where the row used for comparison changes based on the value in one cell. Here is the link to the sheet I am currently working on.
https://docs.google.com/spreadsheets/d/1t7pgvGjxs1Eb3cCcRnLDA6E9ov5riEDAjn-fX3A0s8I/edit?usp=sharing
-The table at the top of the is the reference table and does not change.
-the number in column E is the data that determines which row of the table to compare the data in columns G through AN
The Situation:
Let's look at Name 3.
The numbers in G18:AN18 are compared to the G12:AN12 because of the matching number in E18 and E12
If the number in G18 equals G12 - no formatting change
If the number in G18 is one less than G12 - fill color Yellow
If the number in G18 is more than one less than G12 - fill color Red
This is true for each cell in row 18 columns G:AN
- That's the easy part -
Now, when the number in E18 changes (from "9" to "10" for example), I need it to stop looking at row 12 and now look at row 13 because E18 now matches E13
I know that I can do it using nested IF/AND statements but I would have to do it for each and every cell individually. How can I do this more easily through google sheets?
You need to use INDEX/MATCH, so for the yellow formatting starting in G16:-
=G16=INDEX($G$4:$R$14,MATCH($E16,$E$4:$E$14,0),COLUMN(A:A))-1
The idea is that as you copy it across the column changes to B:B etc. so you get the next column of the top region and as you copy it down you get whichever row matches E16, E17 etc.
I'm sure you can modify it for the red formatting and also to take account of any blank cells.
Also, in this particular case that the numbers in E4:E14 are just the numbers 1-11, you could use E16:E25 to index directly into G4:R14 and make the formula a lot simpler like this:-
=G16=INDEX($G$4:$R$14,$E16,COLUMN(A:A))-1
Hi I am new to Excel/Google Spreadsheet.
I have a problem that I want to search the entire sheet for a given string.
For example the table looks like
A B C D
1 foo 1 bar 2
2 bar 9 abc 3
3 foo 2 bar 4
LOOKUP/MATCH/VLOOKUP can only search one row or column, I need a formula to search for the whole sheet for 'bar', and return the array of all found cells, e.g. {$C$1, $A$2, $C$3}.
What's more (the ultimate goal) is to calculated the sum of the numbers next to the found cells, in this example, 2+9+4=15.
I hope this can be achieved without VBA so that I can use the formula in Google Spreadsheet as well.
For your example, in Excel:
=SUM(IF(A1:C3="foo",B1:D3,0)) entered as an array formula, with ctrl-shift-enter
In Google:
=ARRAYFORMULA(SUM(IF(A1:C3="foo",B1:D3,0)))
The ranges can be as large as you like. The important points are that the first range covers all of the values you want to look for text in, and that the second range is the same size but shifted one cell to the right.