INDIRECT function - problem when switching from Excel to Google Sheet - google-sheets

I built an Excel file then, I converted to Google Sheet.
The file contains 2 tabs:
The "Consolidated DB" tab contains the raw data (it will be populated by Make with automatic row additions).
The tab "Parameters Selection" is a dynamic copy of the tab "Consolidated DB" thanks to the following formula:
=INDIRECT("'Consolidated DB'!L"&LINE()&"C"&COLUMN();FALSE)
that I wrote in cell A2 of the tab "Parameters Selection" and that I pulled on all my rows and columns.
On Excel the formula works perfectly and returns me as desired the values of each cell of the tab "Consolidated DB" in the tab "Parameters Selection".
However, once I convert the file into a Google sheet it adapts my formula as follows:
=ARRAY_CONSTRAIN(ARRAYFORMULA(INDIRECT("'Consolidated DB'!L"&LINE()&"C"&COLUMN(),FALSE)), 1, 1)
and returns me the error below:
enter image description here
Do you have any ideas for solutions?

=INDIRECT("'Consolidated DB'!L"&LINE()&"C"&COLUMN();FALSE)
In Google Sheets, you can copy a larger range with one { array expression }, without copying the formula around. Choose Insert > Sheet and put this formula in cell A1 of the new sheet:
={ 'Consolidated DB'!A1:Z }
The range reference in the above formula will adjust dynamically as you insert and delete rows and columns in the source tab. To keep referencing the same range, regardless of tab layout changes, use this instead:
=indirect("Consolidated DB!A1:Z")

Related

Paste comma separated content into different cells in google sheets

Say I have the string "1,2,3,4". Is it possible to paste that string into Google Spreadsheets in such a way that each of the comma-separated values goes into a different cell to the right of the selected one?
This is what the spreadsheet would look like after pasting.
Since the file is a CSV. Ensure it is saved with the .CSV extension and upload the file to google sheets.
You also have the option of opening it with Microsoft excel and then pasting the cell formatted text into the google sheet.
Also You can paste the comma separated values into the google sheet and then click the paste icon that appears below the cell and select the 'Split text into columns' Option
Enter into the spreadsheet
=SPLIT("1,2,3,4", ",")
No. If you try inserting any formula by overwriting the selected cell the data the formula needs will be overwritten, hence not be available to the formula.
You could use say:
=split(A1,",")
to obtain the results you want to the right of the cell with data in, but this would have to be placed to the right of the cell with data, not in it.
#Treyten's A would also achieve the result you seek except that it would not be to the right of the chosen cell (etc) but in the chosen cell (and to its right etc, assuming the usual LTR).
Similarly with #tks.tman's A. The contents spill out to the right but they do not start in a "cell to the right of the selected one" but in the selected one.
First select the cell on of your action and click Data
1st step
Now, select 'split text to column', it will name it a number
2nd step
now, again goto data and select split text to column open it will transfer every comma separated element into individual columns
3rd step

Google Sheets - get the right-most / last non-empty value of a row from imported sheet

I have a sheet which imports data from a different sheet.
I inserted the sheet ID of the imported sheet in cell A1 to make it easier for me.
I need something that I can give a ROW and it will always return the right most / last non-empty value. That is, it automatically updates whenever we add a column in the imported sheet.
I've found this formula to show the last value of row 9 of the same sheet:
=FILTER(9:9,COLUMN(9:9)=MAX(FILTER(COLUMN(9:9),LEN(9:9))))
But I'm struggling to show the last value of row 9 of the IMPORTED sheet. How can I connect this formula with the imported sheet, that means with the Sheet ID (inserted in my new sheet in cell A1)?
Thanks a lot!
Assumes the relevant row number is entered in A2. Ugly but might be good enough:
=index(indirect("Sheet!"&row(A2)&":"&row(A2)),MATCH(1E+100,indirect("Sheet!"&row(A2)&":"&row(A2),1)))
Replace Sheet as appropriate.

How to show range of cells from one sheet in another with formating

I have a document with several sheets.
Each sheet has a range of cells (on the same row, spanning multiple columns) that are specific to that sheet (sheet "description").
I want to make a "table of contents" sheet that shows the name of each sheet and next to it, show the above mentioned range of cells as they are in each sheet.
I've tried with =ARRAYFORMULA(Sheet1!C2:AJ2) and with =IMPORTRANGE("sheet-ID"; "Sheet1!C2:AJ2"), but both of them brin in just the cell data, not their formating.
The formating includes: cell merging, font, background color.
How could I mirror on the "Table of contents" sheet, the "description cell range" of each sheet?"
This is not possible by using formulas. Instead you should use copyTo(Range) or copyTo(destination, options) methods from Google Apps Script.
I know its too late, but for new visitors.
You can use sort function. Simply add a sorted column to your range. Then sort the whole range again on your new sheet by the new column.

Formula missing when Adding Rows in Google Sheets

I have made a simple formula, based on cells in the same row, to indicate to the user that they have entered enough information - and it works as needed .
=IF(AND(ISTEXT(B20),ISNUMBER(C20),ISNUMBER(E20),ISTEXT(F20)),"Ok",IF(AND(ISBLANK(B20),ISBLANK(C20),ISBLANK(D20),ISBLANK(E20),ISBLANK(F20)),"","MORE INFO"))
However, when I click the built in "add more rows" button at the bottom of the sheet the formula is not present in the new cell - but any dropdown menu or validation I've used in the cells not containing the formula are present in the respective added cells of the new row. Any Ideas why just the formula is missing ? Thanks.
Thanks to GimelG at Google Docs Forum..........
When you add additional rows, Sheets assumes you want to continue the same dataset and, therefore, applies the existing formatting as well as Data Validation. It does not, however, copy formulas automatically as that would be adding actual new data to your sheet.
You can use an ArrayFormula version of your formula to populate the entire column, which it would continue to do as you'll add more rows of data. Assuming your data starts at row 2 (below the header), try this:
=arrayformula(if(istext(B2:B)*n(C2:C)*n(E2:E)*istext(F2:F),"Ok",if(len(B2:B)+len(C2:C)+len(D2:D)+len(E2:E)+len(F2:F),"MORE INFO",)))

Excel creates new sheet from invisible data in pivot table cell

I have been sent a pivot table in excel 2010, and the data in the cell is linked to data not visible on any of the sheets when double clicked. When the cell is clicked on a new sheet is created with data not previously visible on any sheet. However, when I use the pivot table tools to search for the data source it leads me to data in one of the visible sheets and does not allow me to click on the external data source section. I would like to create something like this/ understand how the cells are simultaneously linked, as I do not understand which data is most relevant to the cell.
My hunch is that you have selected a calculated field (select your PT, PivotTable Tools > Options > Tools - Formulas, List Formulas). In other words, you are able to see the relevant source data in your spreadsheet but you are not recognising it as it does not look familiar to you because a formula in the PT has combined or modified this data.
Note, above based on Excel 2007 however.

Resources