I have three columns in mat-table.
The first column is Number, the third column is date and the second column contains a big string.
I want the first column to be 15px, third column to be 100px and middle column rest of the width. In Percentages 5%, 85% 10%.
How can I achieve this in mat-table?
You can use flex property to achieve the desired behavior.
//First column and header
.mat-header-cell:first-child,.mat-cell:first-child{
flex:5%;
}
//Second column and header
.mat-header-cell:nth-child(2),.mat-cell:nth-child(2){
flex:85%;
}
//Last column and header
.mat-header-cell:last-child,.mat-cell:last-child{
flex:10%
}
Here is the stackblitz link to see the demo.
https://stackblitz.com/edit/angular-155qbp
Related
enter image description here
Hi, row P, how do i change every number to 1. I dont want to add numbers to emty cells.
Add a new column next to column P.
In the cell of the second row in this new column put this formula
=ArrayFormula(IF(P2:P<>"","1",))
I need to set up conditional formatting in Google Sheets to highlight an entire row if the text in column D is not found in column C in each row.
Custom formulas tried:
=COUNTIF($C:$C,$D2)
tested to get the rows to highlight if the cells in column C are the same as column D. This worked (but I need it to highlight the opposite rows - if they are not equal) if there is only one entry in column D.
=AND($C2<>"", NOT(COUNTIF($C2,$D2)))
I would like to write a quick Google Sheets code that allows me to do the following:
In a cell (under the chart shown), if the value in the Diff. column is greater than 0 (the red cells), I want to populate the cells with the item from the "Part Description" column.
Thanks for your help!
The following would return the part description in column A if either the value of Diff in column F or I was greater than 0.
=IF(F2>0,A2,(IF(I2>0,A2,)))
Then to create a list of the unique results without blanks.
=UNIQUE(J1:J)
How can I add values in columns (T,U,V) and put the result in each adjacent cell in column S?
Example:
In the top column S cell where you want the result, enter the formula =SUM(T1,U1,V1) replacing row number "1" with the row number on which you are entering the formula.
Then, copy (ctrl-c) the cell containing the formula, and paste it into the cells in column S below.
When you copy & paste a formula, the spreadsheet will automatically adjust the row numbers according to where the formula is pasted.
Note, it will also adjust the Column letters, but in your case this is not relevant, since your Column positions are constant.
See the SUM formula documentation here:
https://support.google.com/docs/answer/3093669
If 14 is in Row1, in S1:
=arrayformula(mmult(T1:V*1,transpose(T2:V2^0)))
Courtesy #Max Makhrov
from here.
I'm using Google Spreadsheets. I'll be using this image from a very similar question.
http://i.imgur.com/jqcNW.png [a link]Google Spreadsheet Formula to get last value in a row
Instead of giving the value, I want the Column top to show. So the H column would look something like: 2 1 3 1 4
(The product numbers from Row 1)
If it helps =index(B2:G2;1;counta(B2:G2)) was the answer given to the original question. My values would be words instead of numbers. It'd need to track the last 'Yes' in the row with the column top being dates.
I think this should be easy:
=index($B$1:$G$1;1;counta(B2:G2)) - if you write this to the H2 cell, it should search the "N"th element in the FIRST row ($B$1:$G$1) - where N represents the value of non-empty cells in that row (B2:G2).
You can then populate this H2 formula downwards.
Let me know if this helps.