Purchase Date (column A)
Sales Date(column B)
Quantity(column C)
Name (column D)
Gain/loss (column E)
The spreadsheet is sorted by name in ascending order and also by quantity in ascending order.
Assuming row 1 is the heading. If D2 (name)= the same as another D cell and it's quantity i.e. C2 is negative, while the other D cell with the same name as D2 has a positive quantity i.e. corresponding C cell, and if the date in B2 is greater than date in column A of the other cell where it's D cell matches D2 and has a positive quantity, then in I would like "possible" to display in F2.
I have included an attachment to better illustrate what I have described above, because I am not sure if I am clear enough.
I've got an indexmatch that works great =IF(ISERROR(INDEX(accountstaff,MATCH(B$20,INDEX(accountstaff,,1),0),MATCH($ A55,INDEX(accountstaff,1,),0))),0,INDEX(accountstaff,MATCH(B$20,INDEX(accou ntstaff,,1),0),MATCH($A55,INDEX(accountstaff,1,),0)))
But I need to incorporate IF statement based on varying levels of revenue and think VBA will be less cumbersome, but don't know how to combine else if and index match.
I am trying to accomplish this: IF B$20 (which is a dollar amount is = X, then index, match.... IF B$20 is > Y but < Z, then index, match...
I wish to embed/nest (I'm not sure what the difference/ correct syntax is)
These Funtions:
1. "=INDEX($H$4:$H$9,MATCH(G14,$G$4:$G$9,0))"
2, =HLOOKUP(Arg!D10,Arg!$D$10:$DA$50,5,FALSE)
The HLOOKUP returns a text value that the Index and Match convert into a number. I wish this to be done in one cell - is this possible?
I'm using INDEX with MATCH because HLOOKUP can return a 'not applicable' that equals '6' this need to be discounted in my results but that is a digression FYI.
I would like to use a custom function or excel formula, if already exists, that finds the text "12 months" and then returns the value of the column that holds that value.
I have the formula below: =IF(OR(LEN(B2)=0,C2>0),"",IF(AND(VLOOKUP(A2,$A3:$D$99,4,FALSE)=D2,VLOOKUP(A2,A3:$D$99,3,FALSE)>0,B2> A2),"Possible",""))
It should bring back the result "possible" when C2 is negative and D2 (name) matches other D cells while B2 (date) is greater than the A cell (date) for the corresponding matched d cell also the corresponding c cell is positive. But I think the formula is not incorporating b2> corresponding matched column a.
I have two spreadsheets (the samples for which I have shown side by side in Sheet 1 of the attached file).
Spreadsheet 1 is about 30,000 rows and too large for me to change the formatting and structure.
Spreadsheet 2 is the output I need and the format is required by other stakeholders.
In spreadsheet 1 I want to sum quantity in stock for Type 1, Type 2 and Type 3 for each product and allocate it to spreadsheet 2 according to the month in which the product expires. For example, there will be a total of 92 units of product 413302 which will expire in Nov, 2014. Therefore I want 92 to be placed in cell N6 of Spreadsheet 2.
Unfortunately the product number is not unique - there are multiple sub products in spreadsheet 1 but they all have the same quantities of stock. The sub products are referenced in other parts of the report so I can't consolidate by Product Number. This also prevents me from using the SUMIFS function as it will duplicate the number found in the sub products.
What I need, perhaps in a combination of functions, is to find the first instance of product 413302 in Spreadsheet 1 that is expiring in Nov 14, sum the product types and give the result in cell N6 of Spreadsheet 2.
I'm at an impass and need some help please. I'm trying to create a spreadsheet that will look up UNSORTED data in Column A and return the value of the corresponding Row data in the adjacent column. Can this be done? It is my understanding that LOOKUP functions only work with sorted, ascending data, but this is not possible with the data I'm trying to analyze.
(eg. COLUMN A - contains unsorted list of names COLUMN B - contains numbers indicating skill level of the person in the next column
I need the formula to look at column A, pick out "Joe Smith" and return the number value from COLUMN B)
I have multiple IF functions in a formula and found out that the maximum allowed is 7 and should use Lookup instead. The formula is to calculate the Present Value of an amount with the corresponding interest rates and number of days left.
What I would like to do is have a master workbook that I can import different .csv files into as a new worksheet. Then calculations will be run on the values that are imported. My goal is to select a column and have corresponding list update the values. After that formulas will run on the calculations. I have got the import csv file down using VBA. The problem I was running into was with the Data Validation. Since I was overwriting my existing sheet I would get a #REF error because the link was broken. So I have worked my way around this for the list using the OFFSETSHEET Function:
VB: Function SHEETOFFSET(offset, Ref) [COLOR=#0000ff] ' Returns cell contents at Ref, in sheet offset[/COLOR] Application.Volatile With Application.Caller.Parent SHEETOFFSET = .Parent.Sheets(.Index + offset) _ .Range(Ref.Address).Value End With End Function
This returns a value to a row in my mater sheet and I reference this for the data validation list.
However, I get the same problem when working with the HLookup function, the #REF error occurs. So far the only way I have figured out to work around this is to create another sheet that dynamically updates its values using the same OFFSETSHEET function, and my master sheet then references it.
Is there a lookup function available that keeps the line breaks in from the lookup array? As shown in the example the Vlookup omits them, I have also tried with Index/Match, but its the same story.
I have a range of cells (say A1:D8). I wanna find the address (say $B$2) of the minimum value in that range.
This command does it but it only works on a column. it does not accept a range spanning more than one column. =CELL("address",INDEX(B2:B7,MATCH(MIN(B2:B7),B2:B7,0))) this will tell me the address of the minimum value.. but in a column... I need a range of many columns.
So I tried converting things to a Table.. but it never worked. basically the MATCH command is my problem. It only accepts single-column-ed ranges.
What I'm wanting to do is essentially use a reference to update yet another reference.
In more detail, I want to retrieve a value on a worksheet and use that value to alter yet another reference to another worksheet.
For example, I want to retrieve a value (let say its 16 from either a local cell or a cell on another worksheet) and then retrieve yet another value from another worksheet based upon that value (lets say the worksheet I would want is then "Subject 16").
I've attempted various nesting formats of the typical reference formula but obviously have had no luck. Would I need to use VBA or is there a simple solution that I am missing? If I do have to use VBA how should I go about doing this?
In (C2+) it should display one of the following results - "Listed", "-" meaning not listed, or "Listing Ended". This is worked out from the corresponding dates to the right of "Selling Status" and in (G2) which contains the current date. So when there is nothing entered in (D2) "Selling Status"(C2) should display "-", if a date is entered into (D2) it should then go to "Listed". This part I’ve managed to accomplish, however, when I try add the next part to the equation, it doesn’t seem to like it.
If "Listing End Date"(E2) is less than the current date(G2), "Selling Status"(C2) should then go to "Listing Ended".
This is the current formula I have (below) which does actually display "Listing Ended" However it also contains the "Listed" which it should over right.
Current Formula - =IF((D2=""),"-","Listed"&IF(E2<G2,"Listing Ended",))
I have a template with multiple sets of the same categories. I want to consolidate the data for each category in a summary. However - the template is expandable by using a macro - so the number of SETS of categories is not fixed. So a simple SUM function won't work since the list of cells expands. I don't want to re-write the formula each time and the method I have is "brute force" with lots of extra columns.
My thought - If I do a VLOOKUP for "Design" and the data is the "unit cost" column can a formula be written to see all the occurences of "Design" and SUM the "unit cost" returns?? example book is attached. hit the "add option" button to see the way the sheet expands.
On attached Spreadsheet, we are using Vlookup to create Team pages for coaches. Works great for giving coaches a team sheet when they leave draft. I have been aasked if we can cultivate the info a little differently for ubiform screenning. Company wants a count of sizes by position, that is everyone in position 1 will get number 40. How many #40 AS, AL, AM do we need.
There are 157 teams. SO I need to loop throgh each team, pull each size for each position and put it on Size sheet. I was thinking a vllookup/countif or sumif combo would work but have not been able to come up with it.
I am aware of the following topic in the VBA Help file:
"Using Microsoft Excel Worksheet Functions in Visual Basic You can use most Microsoft Excel worksheet functions in your Visual Basic statements. To see a list of the worksheet functions you can use, see List of Worksheet Functions Available to Visual Basic.
Note Some worksheet functions aren’t useful in Visual Basic. For example, the Concatenate function isn’t needed because in Visual Basic you can use the & operator to join multiple text values."
And I'm aware of how to call Excel funcitons from within VBA; e.g., answer = Application.WorksheetFunction.Min(myRange)
However, not only are some Excel functions not useful; the fact is they cannot be used because VBA has a native function that does exactly the same thing and you have to use that native VBA function to achieve your goal. It is these overlapping functions that I am especially interested in. I want to know what I should use directly in VBA and what I need to go to Excel for.
I have a table of data (say Column1 to Column 5) with multiple rows.
Column 1 to 4 will have the lookup values in multiple rows and Column 5 data should be picked up using vlookup or other lookup function.
I managed to somehow bring all these lookup values in (Column 1 to 4) in a single column in another sheet. I am now trying to use some lookup or other functions to match this single column and pick column 5 data in original sheet. Result i am expecting is lookup value in first column and next to it column 5 value.
It is basically a lookup wherein lookup value is spread over multiple rows and columns and result column is fixed. I tried using vlookup, but lookup value column and column number had to change every time when i moved from column1 to 4.
Excel offers many ways to use a key to lookup a value (VLookup, Index/Match, DGet, and the rest). What's the fastest way to perform a lookup of a small table of, say, 30 rows of key-value pairs? Theoretically, it would be most efficient to use a branch table (also known as a jump table). See the wikipedia article for branch tables: http://en.wikipedia.org/wiki/Branch_table. Does Excel/VBA have a way to create a branch table for such lookups?
I want to be able to lookup if anywhere in a cell contains a word from a list of words, and then provides an output.
Column G: VAT payment HMRC payment Pay VAT
I have a table on the side that shows: Column Y Column Z VATHMRC HMRC HMRC
ie. If anything in column G matches one of the words in Column Y, then output the Column Z. I have use a Vlookup that works for the first two, as VAT is the first thing, but dont know how to make it work if the key word is in the middle of the cell.
I have a workbook with 2 different types of sheet - 1 containing source data and the others 'collecting' data from the source sheet, depending on what the sheet is for.
For example, the data source contains different pets, their names, ages and their owners.
The other sheets are on a one-per-owner basis.
What I would like to do is use a LOOKUP / MATCH function to lookup the owner name typed in cell A1 of the output sheet and match it with the corresponding owner name(s) on the source sheet. I would then like it to return with each pet and append the results on the sheet accordingly - like below:
John Smith (in cell A1)
Pet - Name - Age ------------------- Dog - Rover - 3 Goldfish - Tom - 1 Gerbil - Chewit - 4
I am trying to perform a lookup (vlookup) function in a cell in excel and wish to have the range as a variable, so that I can adjust which column the lookup function refers to.
I'm making my own gradebook (attached) and one of my sheets will list scores for each student in different assignments. I have one sheet which keeps track of all students and all assignments with other info. I would like to program cells in one sheet (the third in the attached file) to lookup a particular student's grade in a particular assignment. I figured trying a LOOKUP with an AND requirement might work but it keeps returning the message "could not find value".
My formula references the student's name and the assignment from the identifying cells so that it is easy to copy and paste. I wondered if it was this which resulted in the error, but doubt it.
I am trying to use lookup function to lookup for data in another table (we call it table A). Unfortunately, whenever the code is not in the table A, Excel will return the data from the previous row.... is there any possible way to prevent this... in another word, if the code does not exist in the table A, I want Excel to return 0 or some other figures.
I have a very large spreadsheet of customer information(I call it the master spreadsheet). Each row contains only 3 things: Account number, product bought, Price
Later I receive the money from the customer for that product(the pay sheet) that contains the exact same thing in the same order: Account number, Product bought, Price paid.
What I'm trying to do is compare the two spreadsheets so that when i receive the pay sheet of cusomters who have paid with the amount it will deduct it from the master sheet.
So it should compare account numbers when it finds a match then it should subtract the amount paid (column C) from the master spreadheet price column(column C also).
sometimes customers don't pay the right price so it has to be a subtraction so I can see if it was over paied, underpaid etc.
Right now I'm still doing it manually combining the two documents sorting it by account number and checking for matches in column A (account number).