Excel switch 2 cells around depending on value - excel

I am new to excel and was wondering if you could help with an issue i am trying to figure out.
I have 3 columns and would like to switch A1 with B1 if the date dd/mm/yy in B1 is before the date in A1.

Okay, let's say that columns D and E are empty. You will put the formula in those columns. In column D will be the dates which should go to column A and in column E will be those to go in column B.
In cell D1, put the formula:
=IF(B1 < A1, B1, A1)
In cell E1, put the formula:
=IF(B1 < A1, A1, B1)
And copy the formula down.
Sidenote: To make things go a bit quicker, you can select both cells D1 and E1 (selecting D1 first), go to the bottom of the spreasheet using the scroll bar only push and hold Shift and click the cell E in the last row. This should select everything from above till that cell you clicked. Then release Shift and push Ctrl+D to replicate the formulae throughout the selected columns.
After having the all formulae, copy and paste as values in place (To paste as values, you right click and go to Paste Special, find 'Values' among the different options.
Copy again and paste onto columns A and B, then delete columns D and E.

Related

Fill blank value in Excel

Need help in Excel for the following problem
ColA ColB
A1 B1
A2 B2
A3 B3
A4
A5 B5
A6 A6
A6
A6
if Column B is blank, I need to copy the value of ColA into ColB. But if the value is already present, then no action is needed.
Is it with formula or Vba?
A formula like should be ok (you copy/paste this formula to every cells in your Col)
=IF(B1="",A1,B1)
In column C enter the following formula:
=IF(B1="", A1, B1)
Copy this formula down column C. Then, assuming it looks right, you may delete the current column B, leaving the new column to become the new column B.
It is important to note that this formula won't work if directly entered into column B. In that case, Excel would complain about a circular reference.
Highlight the entire column B used range and press Ctrl+F to open find and replace then insert select
find " " (leave blank)
replace =OFFSET(INDIRECT(ADDRESS(ROW(), COLUMN())),,-1,1)
Which looks like:
Result:
This, INDIRECT(ADDRESS(ROW(), COLUMN()), refers to the cell itelf, and -1 column offset argument refers to column to left.
You can then do copy paste as values to convert formulas to hard coded values.

How can an empty cell have formula?

Imagine a sheet like this:
A1 = 1
B1 = 1
C1 = A1+B1
It has about 20 rows, to make the it work on next rows I have to copy the C1 content and paste it on column C.
But I noticed that I don't need to do that, and every time I put data on A and B column, the column next to B, which is C, automatically sums them up.
For example: In Row 21, C21 is empty, but If I put data in A21 and B21, the C1 automatically sums them up without having any formula in it.
How's that possible?
If you have a repeating pattern, Excel tries to carry it on for you.
So, if you have headers in A1/B1/C2, numbers in A2:B20, and a formula in C2:C20 to add the values in columns A and B, then type a value in A21, hit [Tab], type a value in B21 and then hit Tab or Enter, the Column C formula will automatically be copied into cell C21.
Testing exactly that (Add headers, start in A2: value, Tab, Value, Tab, =RC[-2]+RC[-1], Enter, loop), Excel started autofilling in cell C6 (i.e. the 5th row of data)
its possible that you have the autoadd function activated on that cellAuto-sum Excel, which do that add without put any formula.

Identify minimum and maximum values based on 3 criteria

In the table shown, I need a formula for column D that will indicate the first date (minimum) and most recent date (maximum) that each participant (in column A) took survey A (in column C). Column D would need to indicate "first" and "last" tied to the Participant ID--for example, I would want D2 to populate with "3Last" and D5 to populate with "3First." Column E displays what I would need column D to display. If it's not a first or last date (something in between), or if it's not survey A, the cell in column D would be left blank or 0. If there is only one date that meets the criteria, it should return "First" rather than "Last." I'm pretty stumped on this one... Any help is much appreciated!
In E2, insert the ARRAY formula listed below. If you have never used an array formula, follow these steps:
select the formula from this page
copy it
go to excel
select cell E2,
press the 'F2' key
paste the formula
press CTRL+SHIFT+Enter (instead of just pressing enter)
To copy down, follow these steps:
Copy cell E2
Move down to cell E3 (instead of selecting a range)
Paste in cell E3
Select your range and paste from there.
If you don't copy down in this manner, it will tell you that you cannot change the array...
=IF($C2="A",IF($B2=MIN(IF(($C$2:$C$7=$C2)*($A$2:$A$7=$A2),$B$2:$B$7)),CONCATENATE($A2,"Last"),IF($B2=MAX(IF(($C$2:$C$7=$C2)*($A$2:$A$7=$A2),$B$2:$B$7)),CONCATENATE($A2,"First"))),0)
HTH

Excel Transpose and Link Simultanously

I know how to link on cell to another so that its content changes to match the source cell.
I know how to transpose a row into a column.
Is there any way to transpose a row into a column with links that dynamically adjust to match their source?
Try locking your cell references before transposing them. Turn your formula from:
=B2
to
=$B$2
If you do not add the $ to the row and column part of the cell address, the address will change during the transpose operation.
In my example, I filled the cells A1 to E1 with their a1 to e1 to match their cell address. In the row below, I put =$A$1 in A2 and so on to =$E$1 in E2. You will notice the formula for E2 in the formula bar from this screen shot:
I then selected the cell for the top of my transposed column (in my case C4) and right clicked and selected paste special: (note there is a short paste transpose, but I cold not get the right click menu to screen shot)
And here we see the transposed column with the formula in C4 is =$A$1 and the formula in C8 is =$E$1

copying the data from formulated column in Excell?

Hi I have three columns in MS Excell. The columns are A1,B1,C1. C1 is calculated automatically based on formula. The formula defined for C1 is(=A1+B1). I mean C1 is the sum of A1 and B1. Now the problem is I wanted to copy the value of C1 to A1 and want to make the B1 column filled with 0.
The moment i try to copy C1 and paste it into A1 the A1 is displaying as "#href" something like this. so how do i copy the value of C1(without Formula) and then paste it to A1?
When you copy from C1 in A1 Excel is trying to insert in A1 the same formula contained in C1 with your relative addresses adapted to the new position, so the new formula in A1 should sum the two cells at the left of A1, but there are not cells at the left of A1, so the #href error is telling you that.
To do what you want you should paste it like "value". You find that option in the Paste command

Resources