Copy rows to another sheet while maintaining original referencing - google-sheets

I have a Google Sheet with rows of data. There is a second sheet which uses a reference formula to pull from this data. I am making a third sheet where I may need to copy rows from the second sheet varying numbers of times. However, I need it to pull from the original cells (i.e. use absolute referencing, but while copy-pasting data instead of putting a dollar sign on everything). Currently it just maps to the corresponding row in the first sheet which I don't want.
How do I do this?

I think I figured it out... ctrl+shift+v to just copy the values

Related

Copying Conditional Formatting without adding to the data set

I have an inventory and ordering management Sheet where I use color coding via Sheets Conditional Formatting to make some cells quickly visible as having outstanding orders. In my particular case, I am using conditional formatting based on a neighboring cell.
The sheet I built utilizes several columns for ordering cycles with our suppliers. When I am ready to move on to the next ordering cycle, I copy and paste a set of columns to create the new cycle.
The problem that I encounter is this: the new column's Conditional Formatting gets added to the old, both in terms of adding a new column to format, but also referencing the cell from which the copied columns use to decide whether to format.
Original Order Block
In this second image, I have pasted a new order block from Columns AD-AL to Columns AM -AU.
Pasted Order Block
There are two things that I am trying to solve:
I would expect the custom formula to update to =$AR5<>"", but it holds on to the Original Order Block's formula, thus applying the formatting from cells that are in the Original Order Block.
I would expect the range to update to only the new range of AQ5:AQ397, rather than add the additional range to the original order block range.
Each order block needs the conditional formatting to be independent from the one which it was copied.
Thanks in advance.
In this case, you can just remove the "$" from your custom formula and it will move just fine
Your ranges are going to be together as you shown, but will look at the cell at its right

Find a way to increment formula in merged cells and blank cells

It's my first time posting here, I tried to look for something similar to what i am looking for but couldn't find anything, but if I just didn't look enough, I apologize.
My problem is as follows:
https://docs.google.com/spreadsheets/d/10yx-WO_SlOnFLNW83N8wucOrcexfLtt1TE2FDzTAQbc/edit#gid=799857548
I have a data table with information I receive from somebody. I then need to use that information to feel kind of individual product data table on another sheets, and add more to it.
Instead of copy everything of sheets one in sheets 2, I would like it to feel by itself.
I tried with =Cellsadress or =OFFSET and other stuff but couldn't manage to get what I want.
When i put every formula in the green table on sheets 2 and try to increment it by dragging down, the formula values increase by 25 approximately. but i want it to increase by only one, or find another way to show the information in the column of sheets 1 to reflect in different cell of sheets 2.
In my real document i have 100 of lines, so i cant do it manually like i could do with 4 lines.
Is there a way to do that?
If somebody have a solutions i would be gratefull
try this formula for C32 =INDIRECT("'Sheets 1'!F"&(int(row()/25)+2))
when you copy-paste this formula into cell C57 or C82, it will take values from 'Sheets 1'!F4 and 'Sheets 1'!F5, respectively

Apply same formula to every cell

I have a sheet with several numbers, which I want to convert to percentage. These are scores imported from a form, where the maximum score is 5.
According to the bellow image, the cell B2, I applied a basic formula =(3/5)*100% to convert three to 60%.
In order to avoid copy and paste the same formula into all cells, is there any formula to find all the cells and apply its value, divide per 5 and multiple per 100%? I thought something similar to Javascript such as (this/5)*100%.
https://docs.google.com/spreadsheets/d/1ZtqJaXy1pHkjk1sywGfSodo0FcOoLlkou79cZBk-jmU/edit?usp=sharing
you could treat it as array and on Sheet2 use:
=ARRAYFORMULA(IF(Sheet1!B2:AA="";;(Sheet1!B2:AA/5)*100%))
demo sheet
I've also looked for a solution to this for some time.
I don't think it's possible as a cell can only hold one value and the moment you try to change that value, it will delete the value.
Your best bet is to create a different table on the same sheet that references the specified values, then copy and paste the results (values only).
Just create a second Sheet, then in cell B2 of Sheet2 use the formula =Sheet1!B2/5*100%.
Then copy the formula to all cells of Sheet2.

Is there a way to make google sheets import range function stick to the range when it changes in the source sheet?

Context
So I have been using query and importRange to pull data from my other sheets in conjunction with importRange. This is because importRange did not get all the data from the spreadsheet. But it seems as though when I re-open the sheet, after leaving it for a day, the data in the new spreadsheet moves cells from where I placed them.
I have time-series data that have different dates and so the data is placed in different cells to each other relative to the dates. I have placed an example below:
So for instance in the second picture, the data for Softcat will move to a different cell location rather than where I imported it from. The same for Trainline (the third picture).
Problem
Is there a function I can use to prevent it from leaving these cells that I have attached them to? Especially for the ones at the lower end of the spreadsheet?
Should I move data in the source sheet (move around columns), is there a way to make importRange or some other means to stick with this column that has this specific data set? I tried fixing it with the '$' sign but it still displays different data from the listed column reference.
This is the sheet

How to reference a cell in other sheet which contains a referenced cell not locked to this sheet?

I've searched for hours and couldn't find an answer to the following problem:
I have two sheets, Blue and Red.
I want Blue!A1 to be "exactly" like Red!A1 but I find this problem:
Red!A1 contains "B1+B2", both are Red's cells.
However, when I write Blue!A1 like this: "=Red!A1", the return value is something like "=Red!B1 + Red!B2", and not the "=CurrentSheet!B1 + CurrentSheet!B2"
My problem is that I cannot reference the Blue sheet in the Red one because I want dozens of sheets referencing Red in the same way, so when I change A1 in Red I change all the other sheets' A1 accordingly with their respectives B1s and B2s, not Red's B1 and B2.
I want to have a cell in a sheet which can be referenced by any other cell in any other sheet exactly like it was in the first place.
For instance, if I have a cell which contains =B1+B2 in a sheet, I want to reference it in another sheet in a way that the new =B1+B2 references the current sheet's B1 and B2 cells instead of the former one's.
Can someone help me to solve this problem?
Thank you in advance
Alexandre Trajano
Solution 1
Copy & Paste.
In Google Sheets, copy & paste iterates the formula automatically. If you change sheet, it will change the referenced cells to point to the current sheet; if you change location within the same sheet, it will shift the cell references according to how many columns and rows you shifted.
In contrast, cut & paste will move the formula without iterating the cell references.
Solution 2
If you have a truly large number of sheets you want to create based on a template and don't want to c&p a thousand times, you can use Apps Script.
In particular, you will need
Spreadsheet App to create and access new sheets; and
Functions that manipulate cells here.
You can enter the formula via Apps Script as strings.
For example, say you want cell A1 to have formula B1+C1 in a tab named "Sheet1". You can do the following.
var sheet = SpreadsheetApp.getActiveSpreadsheet();
var tab = sheet.getSheetByName('Sheet1');
sheet.setActiveSheet(tab);
var cell = tab.getRange(1, 1); // The arguments are the row and column indices of A1, respectively.
cell.setValue('=B1+C1');
There are many things you can do here with the basic template. You can generate sheets based on some naming convention. You can generate formula based on the cell position. You can create a script that fills in the formula upon the creation of a tab if its name observes a certain rule. etc etc. And naturally, you can duplicate the formulas from one sheet. You will need getFormula() as opposed to getValue.
Note: you can also call
custom Apps Script function directly in your sheet and write your cells using the output of your custom function. But in your case, using the range functions in Apps Script should be more efficient.

Resources