I feel like there is a simple solution to this that I am overlooking?
I have column headers with unique values and a single column (A) with rows of data. I am looking for a way to mark the cell in the corresponding column for the value found in the column A of the row. See screenshot for example. I don't care what it is marked with (X in screenshot example). A solution that would easily executable against 30+ columns and thousands of rows would be preferable.
Type the following in B2: =IF(B$1=$A2,"X","")
Drag this to the right and down.
But using vba would be better.
Related
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.
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 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 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.