Write the matching values in a cell - excel

I have two excel sheets.
The first sheet matches the dates without price, and the second sheet matches the dates with price. I want to compare the two dates and if they are equal I want to put the right price into the B colume, so that it looks like that:
I want to implement this with a excel formula. However, I have no idea where to start.
I appreciate your answer!!!
PS.: My excel version is 2010

You need to use the vlookup() formula in the cells in column B:
=vlookup(A2,E1:F4,2;0)
Where the first value (A2) is the value you want to look up.
The second value (E1:F4) is the table where you want to look your value up.
The third value (2) is the column number of your table where you want to look the value up.
Remember, the fourth value is always 0 (or false).

Related

Adding values to different cells depending on conditions - Excel

I am not very good with excel formulas, and I would need some help with a process I want to implement:
Simplifying things, I have an excel sheet (sheet n°1) with rows like this:
Company name | Price | Date
On other excel sheet (sheet n°2) I have one row for every company, and in each column there are all 12 months. I would need a formula so every time I add a row in the first sheet, the price I add is automatically added to the corresponding company row and in the corresponding month (based on the date) on sheet 2
I am really lost here, I know how to apply simple formulas, but not this, is there a way to add each value to a different cell depending on some conditions?
I forgot to add, that I would need to sum this values in sheet 2, so every time I add a new value, it is summed to the actual value of the corresponding cell.
I hope my english is not to bad, and thank you in advance!! :)
Use SUMIFS()
=SUMIFS($Q:$Q,$P:$P,$A2,$R:$R,">="&EOMONTH(B$1,-1)+1,$R:$R,"<"&EOMONTH(B$1,0)+1)
One caveat to this the month headers must be an actual date in the month desired. This can be formatted any way you want to display. My cells all contain the 1st of each month as their true dates.

Have A Dynamic Sum Function in Excel

So, I feel like I'm trying to do something fairly simple in Excel here. My company has a Spreadsheet with 2 columns and an indefinite number of rows. Column A is the Date, Column B is a production number for that date. At the bottom of Column B is the total production number. However, every time we update the spreadsheet we have to update the formula to include the newest data on every page. We insert columns for the new dates, so is it possible to have a function that changes based on it's current coordinate? For example something like =SUM(B3:B(CurrentRow-1)).
Use this:
=SUM($B$3:INDEX(B:B,ROW()-1))
It is non volatile and will sum everything from B3 to the row in Column B above where the formula is placed.
Hi You can use the below excel formula to achieve the result you are looking at.
If the values you want to sum up is in column B, then type the below formula and it will show the value dynamically when ever you have added a value to the column.
=SUM(INDIRECT("B2:B"&COUNTA(B:B)-1))

Excel function to SUM all the values in a column except the last value

I have a weekly customer deposit amount in a column that includes empty value in between. How can i sum the amount in that column leaving the last cell value. The column is dynamic and next week more deposits come in that increases the Column length. Again i have to sum the entire values leaving the last cell value in that column. Please suggest excel function that automates this. Thanks in Advance.
You can use VLOOPKUP to catch the last value and subtract it, without the need to generate intermediate arrays:
=SUM(A:A)-VLOOKUP(1E+99,A:A, 1)
p.s. unlike VLOOKUP, LOOKUP is provided for backward compatibility so should be used only when necessary.
You could try something like:
=SUM(A:A)-LOOKUP(2,1/(A:A<>""),A:A)
It would sum everything in that column and minus the last cell value, effectively excluding that one. NB: that should not be placed in the same column as may result in circular reference

Return last date something was entered into one column with criteria from another column

I'm working with a set of data in excel. Data is entered into rows for items specified in columns. The first column contains a date. A cell in the same row of one of the columns contains the name of a person and in another cell in the same row but different column may contain a number larger than zero (or it may be empty).
I need to create a formula which returns the date when a number larger than zero was last entered into that column for a specific name. This is a "living list" which keeps on growing and the same names appear in different rows, sometimes with a number in the column a mentioned and sometimes not.
I found an old thread on this site on a similar subject which got me as far as knowing the date of the last entry containing the persons name but I'm still not able to configure it to show me when that specific person also had a number larger than zero in that column.
Here's the thread: How to get the newest value from a column with conditions
My current formula looks like this:
=INDEX($A:$A,MATCH(MAX(IF($G:$G=Sheet7!C5,$A:$A,0)),IF($G:$G=Sheet7!C5,$A:$A,"")))
CTRL+SHIFT+ENTER
Column A contains the dates
Column G contains the names (and "Sheet7!C5" is a reference to a name)
The value column I need to add to the mix is column AY
I feel there must be a simple solution (a small add on to the formula) to solve this but I always end up with an error.
Thanks in advance :)
Edit: Here is a simplified example of the data entry and output list needed.
For this you need to sort the date DESCENDING and format the table as Excel Table
Edit: you can sort the date ascending. See explanation at the end.
Using your example, then the formula will be
=INDEX(TableData[Activity A], MATCH($B14, TableData[Employee initials], 0))
This works just like the usual VLOOKUP or INDEX MATCH, fetching the first date on an activity matching the employee initials.
You can use VLOOKUP, but you'll need to dynamically name the range of each columns.
Edit: Just today I found an interesting behavior of MATCH when it found multiple matching values. If you use 1 instead of 0, then it will fetch the last matching value on the list.
So, you can use this formula instead in ASCENDING table.
=INDEX(TableData[Activity A], MATCH($B14, TableData[Employee initials], 1))

How do I nest the Cell "Address" Formula into a VLookup? in Excel

So here are the Columns:
Column A: Date
Column B: Prices of NASDAQ
Column C: Prices of ABC Stocks
I want to run a financial beta formula, (=COVAR(C1:C1000,B1:B1000)/VAR(B1:B1000).
But, I don't want the cells to always start from the first row... I want to be able to calculate this formula at different rows.
For example, if I have (=COVAR(C60:C1000,B60:B1000)/VAR(B60:B1000)
I want to be able to make that change by referring to a date in a new cell labeled "Start Date" without rewriting each formula.
I'm thinking of nesting a =Cell("address") formula within a vlookup, but I'm having trouble with this.
Could anyone please help me?
INDEX is usually preferable to INDIRECT for 2 reasons
1.) INDIRECT is a "volatile" function which means that it re-calculates every time the worksheet changes - potentially slowing everything down
2.) With INDEX you don't need to "hardcode" the column letters like "C" so the formula will still work if you add or delete columns.
It would look like this
=COVAR(INDEX(C:C,MATCH(Date,A:A,0)):C1000,INDEX(B:B,MATCH(Date,A:A,0)):B1000)/VAR(INDEX(B:B,MATCH(Date,A:A,0)):B1000)
...or rather than repeating the same MATCH function 3 times you could put the MATCH part alone in a separate cell or make it a named range - e.g. named start and formula becomes:
=COVAR(INDEX(C:C,start):C1000,INDEX(B:B,start):B1000)/VAR(INDEX(B:B,start):B1000)

Resources