Fill dates array and add dummy variables - excel

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.

Related

Make a list of values in one column, which do not exist in a second column

I have a worksheet with two columns of data. Column A contains thousands of records, and Column B contains only a few records. I wish to identify which values in Column B do not exist in Column A, and display these in Column D. What is the quickest way to achieve this? Happy to use formulas, or otherwise.
I would use conditional formatting and filters:
Formula being:
=ISERROR(MATCH(A1,B:B,0))
I'd then filter on highlighted cells, select the cells in column A and use Alt+; to select only the visible cells, then paste in D.
Last, I'd clear all the conditional formatting and clean up anything left.
Using formulae would be a little more complex; usually the most of the time would be spent designing it, and it's an array formula (invoked correctly only with Ctrl+Shift+Enter):
=IFERROR(INDEX($A$1:$A$27,SMALL(IF(COUNTIF($B$2:$B$6,$A$2:$A$27)=0,ROW($A$2:$A$27),9^99),ROW(D1))),"")
The formula can also take some time to calculate for larger datasets.

Get differences between two columns in Excel

I would like to compare two columns in Excel and get the list of elements that are present in the first column, but not the second one. The same elements are not in the same rows. My table looks like this:
The expected output would be records "aadapa" and "acaso", since these are only two elements not present in the second column. "aklepac" and "apniewsk" are in the second column only, so shouldn't be outputed.
I would appreciate any help with this case.
If your columns are Column A & Column B, you can enter the following formula in Cell C1:
=IF(COUNTIF(B:B,A1)=0,A1,"")
The drag it to fill down and whatever doesn't appear in the second column will be listed in this column.
With the new Dynamic Array formulas(Currently only available to Office 365 Insiders) simply filter column A with countif:
=FILTER(A1:A4,COUNTIFS(B1:B4,A1:A4)=0)
Put that in the first cell and Excel will spill the rest down.
With Current versions we can use INDEX/AGGREGATE:
=IFERROR(INDEX(A:A,AGGREGATE(15,7,ROW($A$1:$A$4)/(COUNTIFS($B$1:$B$4,$A$1:$A$4)=0),ROW(1:1))),"")
But this requires that the formula be placed in the first cell and copied down till blanks appear.

Highlight a Cell in Excel Based on Identical Contents in a Column with Varying Contents

I am trying to figure out if it is possible to use a formula with conditional formatting or a VBA macro to highlight a cell based on a cell with identical contents in another column, with varying data.
To explain more thoroughly, let's say I have column A, with unique content in each row, rows 1-280. Each row is formatted to be a string of text, such as "12E00" or "97EBC." I also have column T, which is based on imported data, and may contain some of, but not all of, nor in the same row, the data from column A. It also starts at row 9, not row 1. This is repeated on 47 different tabs, with differing row contents on different tabs (some may have 1-280, others may have 1-160).
Is there some conditional formatting formula/macro (with an explanation of the working components of possible, so that I can learn myself and educate my supervision on the inner workings) that would allow me to highlight any of the cells in column A that have the same text string shown somewhere in column T? Additionally, keeping in mind that I'm checking every row in column A against column T and that column T will only contain some of the text strings in column A.
I assume there is a better way to accomplish this.
But if I understood the question correctly, then try using: =ISNUMBER(MATCH(cell,column,0))
I would then make a column next to Column A for each sheet you want to check.
Example table, with a column for each sheet checked, and a column for checking if any sheets matched. Matched cells are highlighted.
47 columns might be too much to, therefore I used Column B to do:
=OR(Table1[#[sheetName]:[otherSheetName]])
Each column have the formula: =ISNUMBER(MATCH([#[Column A]],INDIRECT(C$1&"!T:T"),0)) (C$1 is pointing to the column's header row)
Utilizing INDIRECT() the column will always look in column T in the sheet with the same name as the column header.
The highlighting is done with these conditional formatting rules

In Excel, how to verify that numbers from one cell in sheet 1, are the same with numbers in several columns in sheet 2?

I don't know what formula to use to verify that the numbers in one cell in sheet one are the same with numbers found in sheet 2 arranged in columns. I tried with vlookup but that works only if I search between cell to cell, rows to rows or columns to columns. Can i use a formula/several to find what data I am missing from one cell to several rows? Thanks
Use 
=(COUNTIF(E2:E100,A1)>0)+0
instead of
=VLOOKUP(A1,E2:E100,0)
where A1 houses the lookup value and E2:E100 is the first column of the lookup table of interest. Adjust the ranges to suit.
(source: http://www.mrexcel.com/forum/excel-questions/10000-how-compare-value-list-values-see-if-fir.html)
I think this could help you too: https://superuser.com/a/601421

Continue formulas automatically

I have an excel sheet with columns A-J. Column A-F is filled manually while columns G-J is calculated based on values from A-F.
When filling rows with data in columns A-F, the cells in column G automatically fills with the correct formula while I have to manually "drag" colums H-J down to make them repeat down the rows.
Is there a way of making columns H-J behave like column G. And why is column G behaving like this?
I have the option "extend data range formats and formulas" turned ON.
Thanks!
No idea why your sheet is behaving as it is, but if you format the data as a data table then it will behave as you want.

Resources