VLOOKUP Table Ranges
Nov 28, 2008
Is there anyway to, instead of indicating specific cells to be included in the range of a VLOOKUP table, designate the table range as whatever cells are selected in a spreadsheet.
The VLOOKUP formula is in a spreadsheet called "Template". The VLOOKUP table range will be in a spreadsheet called "Statement of Assets".
Here is the formula I have:
=VLOOKUP("Lookup Value",'Statement of Assets'!$A$122:$C$142,2,0)
But the row numbers in "$A$122:$C$142" is going to change depending on what plan number I am working on. Columns stay the same.
What I want is something like:
=VLOOKUP("Lookup Value",'Statement of Assets'!whichever cells are selected,2,0)
View 9 Replies
ADVERTISEMENT
Aug 18, 2009
I have a Vlookup which I want to modify so that it can become dynamic as the table array part of the vlookup will change.
So the basic vlookup is as follows:
=VLOOKUP($R$3,ATTRIBUTION_FACTSET!$M$60:$P$73,2,0)
but the data I am looking for wont always be in the range M60:P73.
So I tried to make it dynamic by doing the following:
=VLOOKUP($R$3,INDIRECT("ATTRIBUTION_FACTSET"&"!M"&U1&":P"&V1),2,FALSE)
The idea being that U1 and V1 would be numbers that can change so in this case U1 would equal 60 and V1 would equal 73
This vlookup is giving me #N/A and no matter how I modify it I cannot get it to work.
View 3 Replies
View Related
Jun 2, 2013
I created a lookup table that works quite well. It even has if statements in the LookUp Formula. However, I have to update the table it pulls the information from each day. I wind up recreating the range each time because the table always has more rows each time. Is there a way I could just paste the table in each day and not have to change the range? The columns never change.
View 9 Replies
View Related
Oct 28, 2008
I want to create dependent lists using data validation. The lists need to be created from ranges that will be growing as users add more data. I think the best way to create the list is a VLOOKUP. However, I am not sure how to use the VLOOKUP when the range is changing.
I have attached an example. I have a list on sheet "Vlookup" called "FRUIT" with "apple", "orange", "banana". Then to make the depedent lists I have created three other lists called: "APPLE", "ORANGE", "BANANA". I want to pull the COST from sheet "VALUES" into the lists "APPLE", "ORANGE", "BANANA". Users will be adding costs next to the FRUIT they purchase.
View 5 Replies
View Related
Jan 14, 2009
I am having problems getting the code below to follow my intentions. I have 2 files. I have a temporary file that holds all the data that I need. I have a destination file that needs to have data copied into it. In the temp file, I have data for several dates and product types. What I intend to do is to do a vlookup in VBA to look for the date and the product type in the temp file and copy the appropriate data to the destination file. I have numerous named ranges both in my temp file and my destination file. For the code below, I wanted to make a loop to find the date in the temp file that is listed in the destination file. Once this is done, I wanted to find the product type in the temp file that is listed in the destination file. If both conditions exist, then copy a certain range from the temp file to the destination file. My intention is evident in the code, but I don’t think that I am putting in the correct “code format”.
View 9 Replies
View Related
Feb 19, 2010
=VLOOKUP('ITEM ADD-CHG Form'!Z19,Brand_V,2,FALSE) Another wrench!. If the value in cell Z19 is not found in the named range "Brand_V", the formula returns #N/A. I need to replace #N/A with the verbiage DEF while leaving the other results intact.
View 2 Replies
View Related
Feb 24, 2012
I am trying to create a vlookup to get a count of trouble tickets techs completed daily within a table I created, I am using a table since its dynamic. For example I need to see how many tickets Joe completed in a day. See below...
Tech Ticket# Comments Status
Joe 1234 Replaced HD Closed
John 3212 Replace Motherboard Closed
Joe 5678 Installed OS Closed
Above is just an example (my table has 40 columns). I need to vlookup joe and get the count of the closed tickets.
View 6 Replies
View Related
May 8, 2008
I have an Excel File with 2 worksheets.
Sheet1 contains column A as "Product Number", Column B as "Product Family". Rows contain about 20,000 lines of data. A Range has been created to cover both columns, and named "ProdRange"
Sheet2 contains Column A (blank), Column B with "Product Number"
What I am trying to do is start at the top of Sheet 2 "Product Number" (B2 is first cell ref), and use this value to do a Vlookup on Sheet 1, to extract the "Product Family" code on the Offset 1 - and insert it back into Sheet 2 Column A.
I have this below :
For i = 2 To LastRow
Range("A" & i).Value = "=VLookup("B" & i, ProdRange, 2)"
Next i
BUT for some reason it doesn't like the [ "B" & i ] part of the equation.
View 9 Replies
View Related
Nov 9, 2006
I am trying to use vlookup in vba but i receive an error '1004' "Unable to get the VLookup property of the Worksheetfunction Class". I need a way around this. I have ID numbers in the first column and I am trying to input the name of the table it corresponds to in column "O". I have 4 different tables. I am using For Each cell in Selection to go through every cell by using If statement along with VLookup. As soon as the function is forced to go to the next IF selection, it gives me the error.
Range("O3:O" & myCount + 2).Select
For Each cell In Selection
If IsEmpty(cell) Then
If cell.Offset(0, -14) = Application.WorksheetFunction.VLookup(cell.Offset(0, -14), _
Workbooks("Warehouse Inventory"). Sheets("TWGReports").Range("$a$2:$z$1000"), 1, False) Then
cell.Value = "TWG Facility"
If cell.Offset(0, -14) = Application.WorksheetFunction.VLookup(cell.Offset(0, -14), _ .....................
View 3 Replies
View Related
May 2, 2007
1. An amount of money is invested on the first day of any given month of the year;
2. This investment earns interest (calculated at a nominal , not effective, rate) which is credited each month in arrears;
3. Once the interest is credited, it is withdrawn and the effective original investment amount is carried forward to earn interest again (which is yet again withdrawn) until the investment matures in, say, 24 months, when the capital is paid out;
4. On each withdrawal, a certain portion is (with this specific investment, in case you wondered!) susceptible to certain Taxes, which I want to calculate for each Tax year (or portion thereof)
In South Africa, the standard Income Tax year runs from 1 March through 28(9) February of the next year.
I am trying to figure out a formula that will calculate the Taxable Portion of the withdrawal for each Tax year (actually, it may even be done for each month and simply totalled in February for the previous Tax year / portion thereof) until the investment matures.
If an investment is made on 1 June, I need to sum the payments from 06 to end 02 (Tax year1), then sum the totals for months 03 to 02 of the next Tax year and then sum the totals for months 03 to 05 (i.e. 31/05 - ending the 24 month investment period) for the third Tax year.
What can I do do allow for this ever changing differing in the inception month of an investment?
I've attached a s/ sheet where I've used all sorts of statements to mark the inception month (year1) as "Mark1", month 2 as "Mark2", month 3 as "Mark3" and the last month as "Mark4", I've used "running months" (1-24 in the example above) etc, but cannot figure out how to use any function I know to help!
Vlookup, IF, Sum, AND etc -
View 9 Replies
View Related
Jun 5, 2014
I'm trying to see if you can look up multi columns for a number and when it finds it return back to one column and return that data?
I am trying to sort out territories for a state I work on; the territories are divided up by zip codes.
i.e.
A B C D
territory 1 12345 54321 11222
territory 2 22222 33333
territory 3 44444 55555
and what I want is to say put a formula in cell B3 on Sheet 1 pointing to cell C3 that has zip code 33333. I want it to then take that and look in Sheet 2 and search A1:D3 and when it finds 33333, return "territory 2" back to cell B3 on Sheet 1.
View 3 Replies
View Related
Jun 25, 2014
I am looking for the formulae in E9.
I may change the value in E8 as 1.5 or 2.5 or 4 or 6 I may scrolldown C9 as it set out there. I need to know the farmulae in E9.
View 6 Replies
View Related
Jan 20, 2010
I've information in two sections of a worksheet, columns A and B (range named "temp1") and columns D and E (range named "temp2"). I should also say that the reason I have two sections is that each section will have about 150 rows, so instead of having a huge list of 300 rows, I've tried splitting them into two sections.
AB
1a
1b
3c
DE
4d
1e
6f
What I want to do it show all the results that match the value 1 using a vlookup formula. Also the values in column A and D may change, i.e if value 4 in D1 changed to 1, I would expect to see "d" included in the results.
This is the original formula I got somewhere else which sorts out my vlookup on multiple matches issue.
View 4 Replies
View Related
Feb 23, 2012
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(ActiveCell, Sheet8.Range("C16:Y1000")) Is Nothing Then Exit Sub
Dim rw As Integer
Dim arw As Integer
rw = 16
[Code] .....
As you can see, my code is located in the sheet8 worksheet object. Now, I have a few questions about this. Because I am located in the sheet8 worksheet object does that mean my code can only work in sheet8, i.e., the following won't work because I am in a Sheet8 worksheet object?
Sheet10.Range("B12) = ..... ....... .....
This is not returning a value in Sheet10? My question is how do I make my code return a value in Sheet10?
View 6 Replies
View Related
Sep 23, 2013
I have a spreadsheet that records the date, specific sporting activities and cash award for participation in a round robin sporting event that was held over 52 weekends. I'm trying to lookup the cash award value of each event the person participated in by using a date range within the vlookup formula.
Each participant has their own spreadsheet which they are able to access via server, and each spreadsheet looks a bit like this:
-Column A contains the date of an event in which the person participated
-Column B contains a category number related to the type of event eg marathon = 12, hurdles = 15, relay = 18 etc. This info is manual input
-Column C contains the amount the person will be awarded by simply participating in the event. This is a lookup value and varies depending on the date the person participated, so I'm trying to incorporate date ranges and 'if' formulas into the vlookup
I'm from Australia so my dates might be backwards...
Spreadsheet:
A B C
1 02/01/13 15 (supposed to be $10)
The formula should read a bit like this:
if (date at A1 is within date range 1st Jan 2013 and 31st March 2013, lookup B1 in table 1 column 2), if (date at A1 is within 1st Apr 2013 and 30th Jun 2013, lookup B1 in table 2 column 2)...etc for each quarter
I don't know if the following is right
=IF(AND(A1>='01/01/2013'+0,A1='04/01/2013'+0,A1
View 5 Replies
View Related
Apr 3, 2008
I am trying to merge data from two worksheets onto a 3rd for a mail merge. The COLLECTIONS sheet contains the acct #, name and amount owed. The ADDRESSES sheet contains the acct #, name and all of the address information. The 3rd sheet is the MERGE sheet that I'm using as the reference point for my word document and the mail merge. Upon reflection the MERGE sheet is probably not necessary, but made sense to have it when I started out.
Never the less...
On the ADDRESSES sheet I am trying to name a dynamic range "AddressList" (I'm trying to go dynamic because the list of addresses will change from month to month). I am using the following formula in the refers to field when I name the range:
=Offset(Addresses!$A$5,0,0,CountA(Addresses!$A:$A),CountA(Addresses!$1:$1))
I think this is what is giving me my problem, because the named range does not show up in the list when I try to go to the named range.
Just in case that is not the problem, the #Ref is showing up when on the MERGE sheet I type a vlookup formula referencing the acct # on the ADDRESSES sheet. That formula looks like this:
=VLOOKUP(A4,AddressList,3,0)
which seems simple enough. Before trying to make the named range dynamic the formula worked fine, which is why I'm thinking the named range is what's giving me the problems.
View 9 Replies
View Related
Jun 24, 2014
Vlookup a table, to another table that has multiple values.
E.g.
Table
GPASP002
Look up table - need to return second coloum but not the first value, all the values?
GPASP002 KZASP100
GPASP002 KZASP500
GPASP002 KZASP600
GPASP002 KZASP501
GPASP002 KZASP502
GPASP002 KZASP601
View 2 Replies
View Related
Jul 9, 2008
I have an worksheet that I import a csv into, each day a new csv is added to the bottom of the previous csv data. I have some code that extracts the date and month # from the cell and places them in helper columns. The code find the last used cell in the helper column and the imported data column to find the first and last row of the new day.
This part works fine. However, I assigned a variable name to the first and last variables and would like to uses these row number to define a range in order to use the range for a vlookup or find operation. This is where I get stuck. I want to use column x and row (variable from first bit of code) to column y and row (variable from first bit of code). Then use a vlookup/find whatever works to find the text I need and get the data. Tips on looping the code would be welcome as well.
I have searched for answers to the problem, on the board and web, but have not found a solution that works for me. (at least that I could get to work!!)
Below is the code as I have it
Public Sub Enter_Date()
Dim DateA As Date
Dim DateB As Date
Dim Cnt As Integer
Dim End_of, Beg_of As Integer
Dim Count As Integer
Dim NumtoFill As Integer
View 9 Replies
View Related
May 28, 2007
Changing Ranges, Vlookup(), If() And Sum()
This is the link to the thread where ByTheCringe2 showed me the power of SUMPRODUCT and sorted my problem out. I don't think you'll need it, but I'd rather reference it before Roy reprimands me! lol
I am building on the same topic, though.
Hi All!
I have an investment where the monthly interest is added back to the capital. The next month earns interest on the higher figure and this higher interest is again added onto the capital and the story starts all over at the next month. OK, that's easy to do (Again, I think!).
All works fine UNTIL the end of the Tax year is reached and Tax on the interest earned is payable from the investment as the capital carried forward is reduced by the Tax payable. In the attached file I show how I calculate the interest earned for each following Tax year (which always ends at month 2) using SUMPRODUCT. Sumproduct is used because I never know whether the initial investment is made in month 5, 11, or any other month and by using certain controls (thanks ByTheCringe2!) I can simply total the interest earned in each tax year - the months between month 3 (start) and 2 (end).
On a seperate sheet I calculate the Income Tax payable as follows:
Firstly, I calculate the standard Tax payable on the investor's income from other sources. I then add the taxable portion of the interest to the standard income from other sources and calculate the tax payable on that combined figure. I then deduct the two figures from each other and get the increase in Tax payable because of the interest earned.
This "increase in Tax payable"-figure is then returned to the spreadsheet on which the interest is added onto the capital. See Sheet2! cells O9:O15. The Tax payable for each Tax year is placed next to taxable values I calculate using SUMPRODUCT (again!) in column N9:N15.
VLOOKUP is then used to transfer this Tax payable figure into the calculations (Column K9:K68) as and when required (only when tax is payable) - and should be deducted from the value in (Same row) Column H and that answer should be transferred to next row Column E (Balance at beginning of month) -
BUT it causes CIRCULAR REFERENCE faults and I am absolutely frustrated at not being able to figure out how to sort it out!
Sheet2, Column E9:E69 (See Sheet2!E19 for Comment explanation) in the attached workbook.
View 9 Replies
View Related
Aug 4, 2007
I have just created a pivot table, however, i have just put the range to the cells that have data in them. The problem is, is that i want to make the cell range bigger, but the cells that i want to include do not have data YET, but will in the future. I have tried creating the pivot tables including the cells with no values, but it ends up puting 1 into the pivot tables cells for some reason.
View 9 Replies
View Related
Oct 6, 2008
I have a sheet that is a download off of another system every month which means that the number of rows change from month to month. I have a pivot table of this data as well but I want it to change it's data range as it changes month to month. I have a Formula in cell C1 that defines the range, the formula is ="A5"&":"&"S"&B1 {B1 being the =COUNTA(A:A)}
Which yields A5:S31. Logically the way I thought this would work is by setting the Pivot Table range to : =Indirect(com.jdedwards.jas!$C$1) But this is not allowed as the range in a pivot table must be more than two rows. The second thing I tried was naming the range. I went to insert->Name->define and set the name to "Download" and the range to =Indirect(com.jdedwards.jas!$C$1). it didn't give me any errors but now I don't know how to set the pivot table to that named range and i don't even know if that is really going to work.
View 5 Replies
View Related
Dec 7, 2006
I need to read consantly changing shift time/ covered data from a Pivot Tables pivot chart and populate this data into number of shifts covered/ uncovered. This information is then put into a chart over a 24 hour period (from 0700 to 0700). I have been populating the data from the pivot chart by hand by referencing the number of shifts in the covered line and dragging it to correspond to the shift time data part. I then have to do this for the uncovered shifts. As the data in the pivot chart is constantly changing, i need to do this data ransfer 'automatically'. I have started to look at and learn VBA, but i am getting nowhere fast. I enclose a worksheet (blank) to give you an idea fo what i am trying to do.
View 4 Replies
View Related
Feb 24, 2008
find the data Attached. I have 3 work books which contain logged, issued and cancelled data stored in different work book. There are two common fields like Location & segment in all the work books whcih are common. I want the data in a sequence by which consolidation should happen for location and the segemnt should be a page field and datas are arranged accordingly. I am attaching a work book.
how to do this in multiple consolidation of ranges in pivot or any other way.
View 7 Replies
View Related
May 14, 2008
The "Sub Shortcut()" line is throwing the error.
Sub Shortcut()
Dim CellString As String
Dim BString As Boolean
Dim StrShort1 As String
StrShort1 = "Copy"
Sheets("Office - Generic").Activate
Range("A3:B14").Select
For Across = 1 To 12
View 5 Replies
View Related
Feb 10, 2010
I need to run a vlookup to find some data. But I have a lot of data about 600,000 lines. Currently this list is spread over several columns (as the limit is something like 50000). How can I make my reference range access multiple columns?
View 5 Replies
View Related
Nov 23, 2011
I get a file every day that contains online orders for a client. They have made the state and country fields on the order form free text, so sometimes the State field has CA, sometimes California, sometimes even Cal or Cali. Oregon may be represented as OR, Oregon, or Ore (and one time even Orygon.)
The country field may have US, USA, United States and sometimes United States of America.
Well, they need this data imported to their system with the states fully spelled out: Oregon, California. And the country spelled out as well: United States, Canada.
Right now I have a lookup tables worksheet that I just have a macro run a vlookup on. But I'd like to know if there is a way I could just put it all in the code, without the external tables.
i.e. some code that, in English, would basically say, "If the value of any cell in column K is among these values, replace it with those values, otherwise just leave it as it is". Could I do that while containing the two sets of values right in the code rather than on a worksheet?
I really just want to replace the standard abbreviated state/country codes with the full text, and if the value does contain Cali or Ore, let them manually make the change. Hopefully that will finally nudge them to just make the online order form utilize a drop-down list of states and countries, rather than free text.
View 1 Replies
View Related
Oct 6, 2008
I have a range of data that is added to constently. I named the range "Download" and defined it as =Indirect(Sheet1!B3) where Sheet1!B3 has another formula which produces the range of the data. I want to apply the named range to a pivot table so that when it updates, the range is updated as well but i'm not sure on how to do this. I put the word "download" in the range input of the pivot table wizard but it results in an error and doesn't complete. how can i set the pivot table's range to the named range that I defined?
View 5 Replies
View Related
Dec 19, 2013
I have 3 tabs in my spreadsheet that I want to combine in a Pivot Table. All 3 tabs have the exact same headings in Columns A-J. I want to create a pivot table to pull in all the data from the 3 tabs while using the Current Column headings to create the pivot table. But the pivot table wizard is only giving me "ROW" and "COLUMN" which does not allow any flexibility to create the table the way I want and move the various column data around.
Is there a better way to Pivot Table data from the separate tabs? My data on each tab is changed weekly and I was hoping to just update the pivot table when the data changed..
View 2 Replies
View Related
Feb 2, 2014
My boss asked me to format a pivot table like this with irregular ranges:
I've had a crack (as seen below and have gotten everything right except the strange group irregular ranges. I'm stumped! I'm not sure if pivot tables even have a function for irregular group ranges.
My raw data looks like here is its layout:
View 7 Replies
View Related
Mar 21, 2007
I have a workbook that contains 52 spreadsheets (one for each week of the year). Each contain the same column headings. The columns contain both numberic and text data which I need to pivot. I can individually pivot each sheet to obtain weekly data but I would like to obtain year to date data throughout the year. How can I merge all of my 52 sheets together to utilize just one pivot table.
View 6 Replies
View Related