Extend GoogleSheets Cell Formula to New Row in Column - google-sheets-formula

I am trying to extend a column formula automatically to new rows when they are added.
My formula is =IF(C:C < TODAY(), 1, 0).
Thanks,
Beth
I know if I use Arrayformula it should work, but I keep getting an error message.

use:
=BYROW(C2:C, LAMBDA(cx,if(cx="",,if(cx<today(),1,0))))
alternative:
=ARRAYFORMULA(IF(LEN(C2:C),IF(C2:C<TODAY(),1,0),))

Related

How do I sort a data range but only return one column? (Sheets)

I have a data range in Google Sheets where I want to sort the data by column B, but only return column A. If it matters, column A is a string, column B is integers.
Using =SORT(A1:B10,2,FALSE) returns both columns A and B, sorted by column B...but I only want it to return column A.
I've also tried:
=QUERY((SORT(A1:B10,2,FALSE)),"select *") <- does exactly the same as sort, tried just for testing
=QUERY((SORT(A1:B10,2,FALSE)),"select col1") <- #value error
=QUERY((SORT(A1:B10,2,FALSE)),"select A") <- #value error (also tried "select A:A" and "select A1:A10")
=QUERY((SORT(A1:B10,2,FALSE)),"select Stat") <- #value error
I've also tried all of the above, but starting with =QUERY(A1:B10,SORT(...
Am I using QUERY wrong? Is SORT not what I want? I could just use SORT in a hidden part of the sheet, then reference the column I want but that feels cheaty, I want to know if there's a way to do what I want to do.
You can set in the first part the column you want to be returned, then the column you want to be sorted with, and then if it's ascending or not (you can then add other columns, obviously. They don't need to be included nor contiguous, but of the same size). Try this:
=SORT(A1:A10,B1:B10,FALSE)
use:
=INDEX(SORT(A1:A10,2,),,1)

FILTER has mismatched range size in Google Sheets

I have the following working an existing sheet2 when filtering data from sheet source A:
=filter({{Source!A1:F115},{Source!R1:R115},{Processed!T1:T115}},Source!Q1:Q115=w2)
But when a new row was entered in source A, it breaks with error:
filter has mismatched range size. Expected row count 1, column count 1. Actual row count 116, column count 1.
When I check the formula became
=filter({{Source!A1:F116},{Source!R1:R116},{Processed!T1:T116}},Source!Q1:Q115=w2)
How can I fix this?
try to not include the end row:
=FILTER({{Source!A1:F}, {Source!R1:R}, {Processed!T1:T}}, Source!Q1:Q=W2)
if that's not the option you can try to freeze it:
=FILTER({{INDIRECT("Source!A1:F115")}, {INDIRECT("Source!R1:R115")},
{INDIRECT("Processed!T1:T115")}}, Source!Q1:Q115=W2)
or you can try something crazy like:
=FILTER({{Source!A1:F115}, {Source!R1:R115}, {Processed!T1:T115}},
INDIRECT("Source!Q1:Q"&COUNTA(Source!R1:R))=W2)

QTP UFT How to find a row number and column number? Angular JS

When I spy the table it shows just browser - Page - WebElement and also UI is developed in Angular JS.
I there any way to find row number and column number? By the way I am using UFT/QTP
From the source-code's image which you have attached, it is quite evident that the webElement corresponding to the rows have class = "ui-grid-row ng-scope". So, you can make use of descriptive programming. I assume that you already have added the object Browser(...).Page(...) to your OR.
Set rowDesc = Description.Create
rowDesc("Class Name").value = "WebElement"
rowDesc("Class").value = "ui-grid-row ng-scope"
Set objRows = Browser(...).Page(...).ChildObjects(rowDesc)
rowCount = objRows.Count 'This variable should now contain the total number of rows"
Now, this is just an idea which you can give a try. If it works for you, you can further enhance it to get the column count. If there is no way you can get the column count, then you can get the total cell count using the same method. In that case, you just need to change the value of property "class" to the one mentioned in the Object Spy Image("ui-grid-cell-contents ng-binding ng-scope"). Now you have Row Count and Cell Count. To get the column count, you can divide cell count by row count.(Again, this will give you correct answer ONLY IF there are same number of columns for each of tbe rows).

Using XPath to find rows where a specific column has value

I'm having trouble using XPath to find a row in a table where a specific column contains a value. The table has 10 columns where 2 of them will show Yes|No but I'm only interested in finding the value in one of the columns (the 4th one). My initial attempt was this:
//table[#id='myTable']/tbody/tr/td[text() = 'Yes']
but it finds it rows from both columns. I thought I could try something like this but it's not a valid expression:
//table[#id='myTable']/tbody/tr/td[4]/text()='Yes'
Any suggestions? Thanks.
You can try this way :
//table[#id='myTable']/tbody/tr[td[4][. = 'Yes']]
The XPath return row (tr) having the forth td child value equals "Yes".

SSRS Matrix hide last column

I want to hide the last column for matrix in SSRS.
The column is in number format.
I have try the column visibility with expression like
IIF(Fields!abc.Value = Last(Fields!abc.Value), true, false)
but it didnt work. It still show all columns.
Is it my last function use incorrectly?
Any other way to do this ?

Resources