I have a table with values with blank rows. I'm trying to copy over all the non-blank entries into another table via a formula (kind like what =UNIQUE() does with unique values).
Basically, the left table is the data, and I want to automatically have it copy the non-blank values in the table and organize it into something like the right table.
I did a lot of googling, but I can't find a formula to do this. Does anyone have a method to achieve this without using VBA?
EDIT: I can't filter the blank rows b/c other cells have information that people need to see
Related
I'd like to fill every other row in an excel worksheet with the value that is following that row.
See example.
Is there a way to accomplish this?
I am sorry if this is an extremely easy task, but I just can't get my head around how this may work, since just plain copying the data, filtering for blank rows and pasting it into the filtered table just doesn't work as I want it to.
Thanks in advance.
Edit: It might be worth adding that I cannot at all change rows or columns in the excel sheet since it is connected to a database which configuration does not allow this.
Add a new helper column with the formula =ISEVEN(ROW()).
Filter this column on TRUE.
Select the range from A2 to the bottom-right of the cells that you want to populate, and input =A3 [Ctrl-Enter].
Clear the filter and delete the helper column.
The goal is to create a series of graphs that will update automatically based on the raw data.
So, I have created a graph manually and want to edit the formula to accomplish the auto update.
The column names will always be the same, so I want to be able to select all data in a column based on the name BUT ignore any cell that is blank (above zero maybe).
The formula excel has given me so far is
=SERIES(rawdata!$M$1:$M$6,rawdata!$A$2:$A$37,rawdata!$M$2:$M$37,1)
So, something like
=SERIES(rawdata![column name],rawdata![column name],rawdata![column name],1)
I'm not sure how the skipping blank columns should work either. To expand on this further only one of the columns can potentially contain blank values. So if a cell is blank in that column then that entire row shouldn't be plotted, if that makes sense!
strong text =OFFSET(Sheet1!$B$2,0,0,COUNTA(Sheet1!$B:$B) - 1)
Try this formula when you define the name for the column of values you would like to have data automatically added from. I know it works when each cell has either a formula or a value. Like a column that is automatically calculated based on values in other columns.
In this formula example the cell B2 refers to the first point of data in the column. (make sure your references are absolute! ie, use $B$2)
This automatically returns the range of data as it changes when CountA is added:
=OFFSET(reference, rows, cols, [height], [width])
=COUNTA(value1, [value2], ...)
Hope this helps! It worked for me! :) If you have completely blank cells in the column you might have to make a couple changes though.
-Reverus
I currently have a formula that copies the cells from a certain column to a new column. It looks like this:
=IF(INDEX(Sheet1!B9:B1048576;1;0)=0;"";INDEX(Sheet1!B9:B1048576;1;0))
And what I did was copy this formula to the entire column:
C6:C1048576
The reason why I need this is that I don't know how big the data on sheet 1 will be. The problem with this is, that it makes my excel really slow because it keeps calculating all these millions of unused cells. So I am looking for a way to avoid copying my formulas across millions of cells.
I was thinking that maybe I can create a function that counts the amount of cells with text and based on this I can insert my formulas only for. But I can't seem to find a way how to do this.
Maybe there is even a simpler way to copy the cells from one column to a new one?
If you're just copying a column, why do you need index? You can replace =index(B9:B1234567896,1,0) with =B9.
In fact, you should be able to write =B:B - if you write this in cell A42, it will look up B42, for example.
(Give B:B a name and you can make things even clearer: =cust_email for example.)
If you really need index, try =index(…)&"" instead of =if(index(…)=0,"",index(…)), if you're removing 0s where index copies an empty cell. (This will turn numbers to text.)
I don't have a good answer for the "keep the formulas synced with the data" problem. (I've never touched VBA but there'll be something in there.) You could try having 10,000 rows of formulas and a warning function which alerts you if the 10,001st data row isn't blank? Or a warning function which counts for non-blanks in the formula column and in a data column and alerts you if there's more data rows than formula rows?
I would like to write an excel function, that will replace some cells, containing text, with values from the table. The text in the cell gives correspondence to the table.
For example:
Here i have my cells that I would like to replace/overwrite. I would like to use the Table of values for matching to match my text1_1 with the newtext in Table of values for replacement at (1,1), and so on.
How can I accomplish this?
What I though is that I do the following:
I know that text1_1 is in column 1 in cell to replace table.
So, I know that text1_1 will be in the 1st row of Table of values for matching, I only need to find the column there.
Once, I have the row number r and column number c in Table of values for matching, then I can use the value at Table of values for replacement at (r - displacement, c) to replace my text1_1 in Cells to replace.
It is possible, that there is a more efficient solution, than what I thought out, so in that case, I am very open to see it.
Which functions should I use? If there is no straightforward way to do it, then could somebody give me some guidance?
Here is a suggestion, assuming I understand your question correctly.
As mentioned in the comments, there is no way to place a formula within a cell that will use the contents of the same cell, because it already contains the formula. What you can do is create a new table to fetch out all the new values based on the Table of values for matching. However, I assume here (using your example) that you know in which column / row to look in the tables. In your example the column number of cell to replace was the row number to look at in Table of values for matching, so my solution fits this situation. Nevertheless, you can easily edit it to fit another need, as long as you now in which column / row to look. So lets start:
Create a new table that match the cell to replace table in size.
In the most upper left cell paste the following formula:
=INDEX($G$3:$M$6,A$10,MATCH(A3,OFFSET($G$10:$M$10,A$10-1,0),0))
Drag this formula to all the other cells, and you will see the new values that match the values in Table of values for replacement
Tell me if it answers your question ;)
I have columns of data, each cell is a formula referencing data from several rows on another sheet (based on a dropdown box).
I now need to update many columns at once and simply copying the formula down into the next cell in the column, Excel tries to match the 'wrong' cells - the column is going down, the rows are going across, meaning I'd have to type in the correct cells manually every time I copy down this formula.
The rows are updated daily with pulled data/VBA and I can't touch the formatting of the columns either.
Not sure how to do this quickly. I have dates placed down each row/column, if that could be used somehow.
Shown: 2 different sheets, example of 2 rows a single cell will reference. There are many of these rows and columns. This is the formula:
=IF($B$7=1,'xx'!L619,IF($B$7=2,'xx'!M619,IF($B$7=3,'xx'!N619,IF($B$7=4,'xx'!Q619,IF($B$7=5,'xx'!Q619,0)))))
When copying the cells down, the formula updates L619, M619... with L620, M620... when instead I'd need P619, Q619...
This may help if you adapt it to your situation:
You can use the OFFSET or INDEX functions to set your spreadsheet up in such a way to transpose a horizontal row of data into a vertical column of data (and be able to drag the formula).
The trick is, you need a column (you can even hide it) with your increments in the cells i.e. 0,1,2,3,4,5,6,7...n
For example:
A1:A101 are where my increment values from 0 to 100 are.
my horizontal data starts at E15, and continues on with F15, G15, H15, etc.
This is my formula:
= OFFSET($E$15,0,$A1)
When I drag this down in a column, it corresponds exactly to the horizontal rows of data. The same thing can be done using INDEX.
Your situation sounds a little more complicated, but you might be able to build on this to suit your needs.