I'm having data set up as:
A1
A2
A3
and so forth and I want to make a formula in Excel which present them row-wise instead:
A1 A2 A3
How do I do this? I've tried to use the formula
=$A1
And drag that out, but it simply presents the data as $A$1 (i.e. it simply copies the value in A1 into all columns of the row.
You need =TRANSPOSE() formula, but it's tricky:
Enter =TRANSPOSE(A1:A3) to cell say B1.
Select three cells with a mouse: B1:D1.
Press F2 key and enter edit mode.
Press Ctrl+Shift+Enter.
Voila!
COPY all your data and PASTE as TRANSPOSE, simple as that ;)
You can find more information here: http://www.techrepublic.com/blog/microsoft-office/transpose-excel-data-from-rows-to-columns-or-vice-versa/
*EDIT: I might have misunderstood the question. If I did let me know and I will remove my answer.
Related
Is there a way to self-reference the cell inside an expression?
For example:
if I want A2 cell to have +1 value in respect of the cell above I write:
=A1+1
If I cut and paste this expression in another cell, it still references to A1.
How to replace that =A1+1 with something like:
=cell.value(this.X,(this.Y-1))+1
UPDATE
Just another use case: create a numbered list (yes, I know excel lines are already numbered, but what about printing?).
Until now I put 1 in A1, =A1+1 in A2 and then dragged A2 lower right corner down to the desired line.
In this way if I delete a row, the following ones become of undefined value.
By putting =OFFSET(A2;-1;0)+1 in A2 and dragging, I can then delete intermediate lines without breaking the sequence.
I guess there are zillions of better/smarter/faster ways of doing this.
use Offset()
so the cell formula would be:
=OFFSET(A1;-1;0)+1
If you copy&paste the actual contents while editing the cell, paste will then put the exact same text into any other cell you select. If you make sure you are not editing the cell, highlight it, copy and then paste into another cell, Excel will automatically update the column and row.
Highlight the cell when not in edit mode, paste into the one below, it will automatically update the row number, =A1+1 will become =A2+1. If you paste it into the cell to the right, it will update the column letter, =A1+1 will become B1+1.
So, for example, if you have the number 9 in cell A1, then enter =A1+1 in cell A2 it will show a value of 10, if you then copy cell A2 (the cell, not the contents) to cell A3, that cell will display the value 11, and contain =A2+1.
If you want to do a long range of cells that add 1 to the previous cell, taking the previous example, highlight cells A2 and A3 then click and hold on the little square at the bottom right of the selection, and drag it as far down column A as you want.
Im not sure what i would like to do is even possible in one formula but I thought it was worth asking the question.
I have 2 tables of information, a simplified version is shown in the image below:
What I would like to do is have a formula in cell A3, A4 and A5 which checks for values in those rows. If a value exists it checks values also exist in the corresponding row in the second table in the same columns as the first table.
The example shows the result i would like to achieve. Rows A3 and A4 are correct but a value is missing from the second table in cell G11 so the formula should identify row A5 as having an error.
Hope this makes sense. If you need more info let me know.
Thanks.
Put this formula in A3 and drag down as fas as needed:
=IF(PRODUCT(--((C3:H3<>"")=(C8:H8<>""))),"Yes","No")
Please Note, that this is an Array Formula. When you put this formula in A2, you don't ommit it like usual, with pressing Enter but you have to press Ctrl + Shift + Enter
I know how to copy one column, then the other, and paste them into a column then remove duplicates. But I want one formula that does this. Is it even possible?
Here is a typical 3 column formula that you can adapt to your needs:
With data in A1 through C10, in D1 enter:
=A1
In D2 enter the array formula:
=INDEX($A$1:$C$10,INT(SMALL(IF(COUNTIF(D$1:D1,$A$1:$C$10)=0,ROW($A$1:$C$10)+(COLUMN($A$1:$C$10)*0.01)),1)),100*MOD(SMALL(IF(COUNTIF(D$1:D1,$A$1:$C$10)=0,ROW($A$1:$C$10)+(COLUMN($A$1:$C$10)*0.01)),1),1))
and copy down:
Array formulas must be entered with Ctrl + Shift + Enter rather than just the Enter key.
From:
Coderre Formula
Here is another one that works on the two columns but sorts it in a different order.
=IFERROR(INDEX($A$1:INDEX(A:A,MATCH("ZZZ",A:A)),MATCH(0,COUNTIF($D$1:D1,$A$1:INDEX(A:A,MATCH("ZZZ",A:A))),0)),IFERROR(INDEX($B$1:INDEX(B:B,MATCH("ZZZ",B:B)),MATCH(0,COUNTIF($D$1:D1,$B$1:INDEX(B:B,MATCH("ZZZ",B:B))),0)),""))
Being an array formula it needs to be confirmed with Ctrl-Shift-Enter instead of Enter when exiting Edit mode. If done correctly then Excel will put {} around the formula.
This formula must be entered in the second row. If you want your list to start in the first row then in the first cell put: =A1 then put the above formula in the second row, hit Ctrl-Shift-Enter, then copy/drag down.
I'd like to create a sheet that has a master formula. From there, I'd like to have a number of lower cells below use the same cell formula but apply it at it's relative position.
For example, in B1 i would write = a1+1.
In b2, I'd like it to apply the b1 formula, so I'd type in a formula to link to b1, but what I really want is the code in that cell, and to have it be relative, so the output would be a2+1.
In b3, id reference b1 but have it return a3+1.
In b4, id reference b1 but have it return a4+1
In b5, id reference b1 but have it return a5+1
This is a very simplified version of what I need. the benefit of doing this is I can change the formula in B1 and have it cascade to all the cells below it. In reality, I can't just drag down because I'm using a template for financial statements on a per market basis. we have dozens of markets and its a pain in the rear to copy/paste them down each time I want to make a simple formula change.
Thanks for any comments. I'd like to do this without VBA if possible. With VBA it gets easy.
Have you considered Named Formulas? If you use relative references in named formulas, then they will be adjusted if the named formula is used in another cell.
For example: Select cell B2, click Formulas > Name Manager > New, enter a name like B2Formula and let it refer to
=Sheet1!A1+1
No $ signs in the cell reference!!!
Now enter this formula into B2:
=B2Formula
Copy the formula down.
Now you decide you need a different formula in B2. So edit the named formula and change it to
=Sheet1!A1*2
and look at the sheet! You only edited one formula, but all the values in column B have adjusted to that new formula
Named Formulas are VERY powerful, especially when used with relative references. Remember that the references will be relative to the cell that is selected when the named formula is defined. Also, when you need to change a named formula with a relative reference, you need to select the same original cell before editing the named formula.
In Excel, how can I set up a spreadsheet so when I type in one cell it will populate another cell in the same spreadsheet?
I'll field this one.
If you want the contents of, say, C1 to mirror the contents of cell A1, you just need to set the formula in C1 to =A1. From this point forward, anything you type in A1 will show up in C1 as well.
Well the simplest way is to have a formula in Z99 =B4 so that when you type in B4 Excel will copy the value to Z99.
But maybe thats not what you are looking for?
If you want to use the example of Ben Hoffstein between two spreadsheets (cell from Sheet1 to Sheet2) you should use the formula =Sheet1!A1
=Value(Click on cell you want to match assuming it's a number)
Copy, Paste Formula along column or row or array