I have a data set that is vertical and I am trying to use a lookup to fill a template on a second sheet.
The template I am trying to fill out is horizontal, what would be the best formula for this problem?
I have added an example with the first image being the data set, the second image is the template I am trying to fill out.
Would I have to do two look ups? I was thinking on the template I would have to do a lookup to get all the item no.s then I would have to do a second look up to obtain all the secondary information.
Use the TRANSPOSE formula.
If your dataset is in Sheet1 occupying cells A1:D5.
In Sheet2(your template sheet) use this formula in A1:
=TRANSPOSE(Sheet1!A1:D5)
Try this:
Select the range of data you want to rearrange, including any row or column labels, and press Ctrl+C.
Note: Ensure that you copy the data to do this, since using the Cut command or Ctrl+X won’t work.
Choose a new location in the worksheet where you want to paste the transposed table, ensuring that there is plenty of room to paste your data. The new table that you paste there will entirely overwrite any data / formatting that’s already there.
Right-click over the top-left cell of where you want to paste the transposed table, then choose Transpose:
After rotating the data successfully, you can delete the original table and the data in the new table will remain intact.
Related
I have a spreadsheet full of data (simplified example below) that I would like to extract the number in the well underneath of "Gimme the number" and paste it into a new column on a separate sheet (i.e. if "Gimme the number" is in G6, I would like to retrieve the value for G7). I do not have access to Excel VBA and have not used macros in the past. I found some examples linked below, but, from what I understand, they would return "Gimme the number", or "Gimme" not 19, 20, and 21. I am not sure if a pivot table is appropriate, because I only want information from a single column. I will only have up to 11 values to extract at any given time, so I think a formula would do it. I am just having a hard time coming up with one that works. Any help would be greatly appreciated!
Search for a text string and return multiple adjacent values
Return multiple matches with wildcard vlookup
I am not sure I get the question well, but I try.
First add a column right of the column with "Gimme..." values. Name it e.g. "Next_value" in the first row. Put in the formula referencing previous column next row. If "Gimme..." is in the cell (for instance) E6, than your formula in the cell F6 is =E7. Copy that formula into the whole Next_value column.
Than select area of these two columns (Label, Next_value) and apply the filter from the Data toolbar. Use the small buttons with triangles at the top of the column Label to adjust the filter so only "Gimme..." rows are filtered.
Now, copy values of Next_value column where you like. If you want just the references, use Paste special function from the Home toolbar and click Paste link button.
I have a table filled with hundreds of values in different cells (not coming in order, chaotic). Now I want to add 20% to each value (=x*1.2).
what formula should I use?
A quick way to get the desired result is to add a new table or worksheet and copy the update formula in each cell (e.g =A1*1.2). You could then overwrite the old values by pasting the new values. Pasting values overwrites any old formula.
If you want to manipulate the formula of every cell, you should look into a vba solution.
This is my solution:
1. Write a 1.2 in an empty cell out of table.
2. Copy this cell (1.2).
3. Select the table with values. Right-click of the mouse, select Paste Special -> Paste Special..-> Multiply. Voila!
Result: all selected values in the table were multiplied by 20%
Thanks a lot to my colleague Lina!
I am trying to drag the bottom right corner downwards to copy some data and it always increments my numbers that I want to copy. If I select copy cells in the auto fill options then it copies the numbers properly but also copies the formatting, but if I select fill without formatting it increments the numbers. I want both. My first cell has a strong border above it that I don't want every cell to have. However my data is in semi small increments of the same problem so copying the first cell once then dragging would be way to inefficient. Thanks for the help.
Original data example
Using copy cells, right numbers wrong formatting
Use the following formula in the any one of the columns you are not using and drag it down to the end of data. Then copy the result to your column E as values. If your helper column is N then:
=IF(E3<>"",E3,N2)
What I usually do in these situations is separate the values from the formatting.
make a copy of the column you want to edit (either adjacent to it,
or outside the table you're editing).
On the new column - use copy cells in the autofill menu, or
otherwise complete the values according to your needs.
paste the new column back on the original column As values.
Delete the new column
I have this table that is made from reference to other table.
and now I want to sort from small to largest the third column, but since it is referenced from another table is not sorting. And I also dont want excel to sort the reference table and I need the table to be referenced because I will change some values on the reference table and I need them to be connected, so I just cant copy and paste the values and then sort.
Could you give me some help?
Ok, I went ahead and built a small example:
The formulas are as follows:
The 3 in Row 20 are to be copied downwards with PasteSpecial>Formulas:
in E20: =IFERROR(RANK($D20,$D$20:$D$33,1),"")
in F20: =IF(ISNUMBER($D20),"",(COUNTIF($D$20:$D$33,"<"&$D20)+1)+COUNTIF($D$20:$D20,$D20)-1)
in G20: =IF($E20="",(MAX($E$20:$E$33)+$F20),$E20)
The formula in B3 is to be copied into the whole target table with PasteSpecial>Formulas:
in B2: =INDEX(B$20:B$33,MATCH(ROW()-1,$G$20:$G$33,0),1)
Please let me know if you have any questions!
This method only works if the entries in the column you are sorting on are unique. You will need to adjust the address ranges to suit your data.
The formulas in the each column start from X and finishing in Z as you move left are as follows:
=INDEX($X$41:$X$47,MATCH(ROWS($Z$29:Z29),COUNTIF($Z$41:$Z$47,"<="&$Z$41:$Z$47),0))
=INDEX($Y$41:$Y$47,MATCH(ROWS($Z$29:Z29),COUNTIF($Z$41:$Z$47,"<="&$Z$41:$Z$47),0))
=INDEX($Z$41:$Z$47,MATCH(ROWS($Z$29:Z29),COUNTIF($Z$41:$Z$47,"<="&$Z$41:$Z$47),0))
Note only the range right after INDEX is changing. Thes are CSE or array formulas. It means you need to press CONTROL+SHIFT+ENTER when you are done editing your cell. Then copy the individual cell and paste it in the rows below the copied cell. pasting including the source cell or dragging down MAY not work. Repeat this for all three columns.
Proof of concept
I am pretty new to excel and finding it a little tricky so any help would be appreciated!
I have a master sheet where data is going to be input by people. From this master sheet I have used IF statements to copy relevant columns to another sheet in the workbook. (not sure if thats the best way).
So when a new data row is input into the master sheet, this creates a new row in the other sheet because its displaying what has been input in the master. This is building up a sub-table so to speak. From this sub data (whether turned to a table or not) I want to create pivot tables.
Issues:
If the sub data is turned into a table, when new data is input in the master sheet the sub-table does not expand.
Trying it another way, without creating a table with the sub data I tried to create a dynamic range using OFFSET. However when an entry is deleted from the master sheet this creates a blank row in the dynamic range that is being used to create the pivot table.
Any help would be much appreciated! I've looked into OFFSET, MATCH, VLOOKUP and it's a little confusing although I do get the gist of what these functions can achieve.
Thanks in advance!
This particular combo is used to fiddle around with ranges, for example validations and complex lookups.
They will not help you with your issue.
The range expansion is triggered when new data is entered into an adjacent cell, not when its existing condition becomes recognizable.
The =OFFSET() is used to fiddle around with ranges.
The MATCH(...,0) finds the first match of your string, in your case the lack of string.
If you could in fact set up a Pivot table to indirect references this formula would be your solution:
=OFFSET(YourSheet!$A$1,0,0,MATCH("",YourSheet!$A:$A,0)-1,MATCH("",YourSheet!$1:$1,0)-1)
where A1 of YourSheet contains somthing like
=IF(IncrementalDataSheet!A1<>"",IncrementalDataSheet!A1,"")
I think I understand the problem you're having. If you have data in A:Z in Sheet1 and you only want to see columns A, T, and Y for example on your more visually appealing Sheet2, then the initial thought would be to put =Sheet1!A1 into A1 on Sheet2, =Sheet1!T1 into B1, and =Sheet1!Y1 into C1. Copy the range down as far as needed to display the data from Sheet1 and Bingo! A nice tidy summarized version.
But wait... If you delete a row from Sheet1, the referenced cell in Sheet2 now just displays #REF!... boo... that's no good.
So, instead of using direct cell references, you can make use of the INDIRECT function to make sure the values produced are always relative based on the address of the target cell.
In Sheet2 you would put:
A1 =INDIRECT("Sheet1!"&(CELL("address",A1)))
B1 =INDIRECT("Sheet1!"&(CELL("address",T1)))
C1 =INDIRECT("Sheet1!"&(CELL("address",Y1)))
And copy down. At first glance it looks just like the original result, the difference is you can now delete rows from Sheet1 without hurting the output on Sheet2 because the indirect references will just look up new values from where everything shifted.
You should then be able to pivot off of the result dataset pretty easily.
That said... when you make a pivot table you pick which columns you include, so you could just pivot off of the original giant table and exclude any columns that you're not interested in summarizing.