Excel dynamic list with no blank cells - excel

I have a table with data of 1000 rows and 10 columns.
From this table, I would like to create another table (on another sheet) that contains only rows with specified condition (e.g. one of the columns has a value 'TRUE').
But of course, I don't want to have table of 1000 rows with many blank rows. I would like a formula that skips all the blanks and gives me just a nice table of 50 rows (or how many fill the condition). I can do with the formula looking into one column for condition and returning value from another column (so I can VLOOKUP the rest of the columns).
I tried formula that I found here.
=IFERROR(INDEX($B$2:$B$1000,MATCH(ROW()-ROW($A$1),$A$2:$A$1000,0)),"")
But when I copy the formula down, it doesn't skip the blank cells. It shows value based on condition correctly, but with blank rows in between.
Any idea if this can be done by sheet formulas?

Related

Is there a way to filter multiple columns in excel simultaneously without one filter influencing the next filter?

I am working on an excel worksheet where the there are 3 columns with certain cells highlighted yellow. The hihglighted cells in one column are in no way related to the highlighted cells in other columns. My agenda is to filter all the rows with the highlighted cells. The problem is if I apply filter in one column, the filter in next column will work only on the rows available after the previous thus excluding the other rows I need in my final result.
I can think of using for loop to check each cell individually for its colour and showing the corresponding row and hiding the rest.
Another option would be record the row number when I am highlighting the cells in the beginning. That way I will have the rows listed that need to be shown in the end.
Is there any other way readymade/easier to filter in such scenarios?

Formula referencing cells as index not working

I have an Excel spreadsheet made up of 2 sheets.
The first sheet is just data that has been imported.
The second sheet is a number of formulas that will extract various counts and totals from the first sheet.
The first formula is as follows
=COUNTIFS(Raw_data!B2:B1780,"Y7",Raw_data!F2:F1780,"M",Raw_data!G2:G1780,"D",Raw_data!L2:L1780,"EN")
It looks at 4 columns in the first sheet and counts the number of records that meet the criteria in each column.
This works fine. However, the number of rows in the raw data (1780) could vary. I have a found a formula that works out the number of rows in the raw data and that works OK. So what I was trying to do, was instead of having the number of rows fixed at 1780, have the above formula get the the number of rows from the cell that has done the row calculation.
So I ended up with this
=COUNTIFS(Raw_data!B2:INDIRECT(CONCATENATE("B",G3)),"Y7",Raw_data!F2:F1780,"F",Raw_data!G2:G1780,"D",Raw_data!L2:L1780,"EN")
where G3 contains the calculated number of rows. (I've only done this for raw data column B at present, as I wanted to prove it first). Excel comes back with #VALUE! in the formula cell, no matter what variations I try. I suspect the answer is very simple, but at present it eludes me.

Excel table fill every third row

I need help with issue I'm having.
I got 2 sheets, 1st sheet is the table I need to fill and 2nd one is the data.
In the data part I have column A with employee number and B with names.
On the first sheet I have table that I need to fill but table is like this:
Blank row
Number column + Name column
Blank row
So when I just drag data to auto fill every third row formula skips employees and I only get every third name.
What can I do to fill every third row from 2nd sheet but without skipping names?
Kind of round about way that I have done it. On datasheet insert column a and put in values A1(1)A2(3)A3(5), Fill down this pattern this is to use as an index for filling the columns on your other sheet. On the sheet you are filling, insert a new column a and add 1,2,3 and fill down.
I used this vlookup:
=IFERROR(VLOOKUP(A1,datasheet!A:C,2,FALSE),"")
I copy this to column b and fill both of these columns down. Now you have your values. You will have to do a copy and paste values to get rid of the formulas once the info is in there. Select all, copy. and Ctrl+Alt+V and select values to do the paste special.
Hope this helps.

Fill dates array and add dummy variables

I have a column with dates called "dates". This column contain dates from 01.01.2010 to 31.12.2010. it should have about 365 rows, but it actually has only 231 rows, because the data was not collected regularly. The others are missing, and I'd like to fill the gaps in time.
How can I fill the array of this column with the missing dates? I want to add 134 rows in the place of the missing ones, filling in the missing dates.
Create another sheet and put all the dates in column A in your new sheet.
Make sure your sheet with the data in it has the data column all the way on the left (important for how Vlookup works)
In your new sheet, starting in Cell B2 put numbers 1 through however many columns you have in your data sheet along that top row.
In your new sheet use Vlookup to find all the rows where there are data
=VLOOKUP($A2,DataSheet!$A$1:$C$20,B1,FALSE)
Note that the lookup column ($A1) is locked in to the column but not the row and that the range you are looking up is locked in in all directions. This will allow you to drag to the right/down and fill everything in.
Drag to the right then drag all the way down.
there will be #N/As where you cannot find a match which you can suppress with either an IF statement of conditional formatting. But now you have a row for every day with blanks when there is not data!
I found a solution with a similar formula, but the result was the same.
First, I got the two columns of data—"date" and "values" in the columns A and B of the worksheet. Each consisted of 231 rows. Then, I spread a full array of dates—365 in a new column D. Finally, I used this formula:
=VLOOKUP(D2;$A$2:$B$1056;2;FALSE)
in C2 and obtained the only the values from column "values" corresponded to the new dates of column D.
Thanks for Brad's answer for directing me to the VLOOKUP function.

Efficiently update (growing) columns of data+formulas, w/ automatically updated rows of data

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.

Resources