How To Use VLook Up Function To Look At A Range Of Numbers
Oct 26, 2012is it possible to use the VLook up function to look at a range of numbers - I.e.
30-40, answer = 15%, I have tried 30-40 also 30,40 but none seem to work?cualte?
is it possible to use the VLook up function to look at a range of numbers - I.e.
30-40, answer = 15%, I have tried 30-40 also 30,40 but none seem to work?cualte?
I am having problem with vlookup.
Cell 1 contains 134 cell 2 contains account number.
can look up value be in 2 columns? It has to be the exact match for both cell in order to generate the data. Thanks.
I am looking for a function that gives a range of numbers a score, here is what i need:
if A1 is between 6&15 B1=25 if A1 is between 16&35 B1=15 if A1 is between 36&65 B1=5 if A1 is 66 or more B1=0
I have a range of numbers between 1 and 25 in 50 cells.
How could I use the countif function to look at that range of numbers for
values between 5 and 10 and count those values that meet the criteria of
between 5 and 10?
Or if there is another function to use, let me know.
I'm trying to use the average if function to average a range of numbers, only if a different range of numbers numbers equal a number in two different cells.
ex. average A1:F1 if G1:L1 equals M1 or M2
Is it possible to create a string with a range of numbers
1
3
4
5
6
8
10
Result: 1,3:6,8,10
Or
1
2
3
4
Result: 1:4
Or
1
3
5
7
Result: 1,3,5,7
Where consecutive numbers are separated by a ":" and other numbers by a ",". I use the following function to create the ","-concatenate, but I don't know how to create the ":"-ranges.
Function AConcat(a As Variant, Optional Sep As String = "") As String
'By Harlan Grove, March 2002
Dim Y As Variant
If TypeOf a Is Range Then
For Each Y In a.Cells
[Code] .........
I need to create a custom function that can do the following without modifying the selected range. If I have data in a row, I need a function that can give me the following result:
Original unsorted data:
79
45
23
56
1
The custom formula will not modify the selected range, and after saving it or copying somewhere and sorting it, it will provide the following result: if N or count(range)=5 , and p=1, average(second and third smallest values of the range)=34; and if N=4 (lets say that we errase the number 1 data point in the range), average(third and fourth smallest values of the range)=67.5 So it is basically a sort and then getting the averages of specified row numbers depending on N or count(range) Here is what I have.
I'm missing how to create a variable with the sorted range and how to use an index to refer to the rows I want to average:
Function CSORT(r, p)
Application.Volatile
'rs or something similar that will contain the sorted range r
Dim rs As Range
'Sort rs (The following line one doesn't work, so I need one that does)
rs = Application.Range(r).Sort
Dim p As Integer
[code]....
i am trying to convert a range of numbers to text using the Cstr function ,it doesnt work. excel VBA help states that CStr function converts a numeric value to a String. i am aware that i can convert a number by preceding it with an apostrophe
i just need to know why Cstr doesnt do the job
Sub covrt()
For Each rng In Selection.Cells
rng = CStr(rng.Value)
Next
End Sub
I am using a Vlookup to pull through information from a worksheet, but I am wanting to vlookup in column a on 12 different worksheets to then pull back corresponding information.
Example
12 worksheets - January through to December.
On each worksheet the first colum is a unique reference number 00001, 00002, etc depending on when we have ordered the goods and each column after that has amount order etc.
In a completely seperate workbook I want to input the unique reference and it to bring back certain information. I have used Vlook up for this, but this only appears to work when searching one worksheet. Is there anyway I can get it to search the whole workbook and bring back the information?
I'm creating a look up function for the staff where you enter in the zip code, and it returns a series of answers (the state the zip code is attached to, the shipping code to use for regular shipping, next day air, and IF it is available for that zip code, the codes to use for Saturday shipping).
My problem is the fact that I'm looking up zipcodes. I have the cells, both the one where you enter in the zipcode to look up AND the entire column of the 29,000+ zipcodes formatted as "zipcode". However the cell where you enter in the zipcode.. it shows the "0" in the cell, but Excel thinks it's four numbers.. it's not recognizing the "0" in the function line. This means Vlookup is trying to find a 4 digit number, and not the 5 digit one I am asking it to, thus I get #N/A as a result for any zip code starting with "0". Every zipcode that starts with 1 or higher looks up just fine.
I have it set as FALSE so it will return the #N/A when you enter in a nonshippable zipcode, or one that doesn't exist.
If I change to TEXT, then it will not look up anything past "0" in the list, so all answers higher that 070xx (new jersey) come back as #N/A
I'd really like to have just 1 look up, not two, one for Zipcodes starting in "0" and one for zipcodes starting with "1-9". Does anyone know what I can do here? I've tried combinations, but am I just missing something? I'd rather not go back and just drop the 0 in the lookup column of the zipcodes to make this work.. I spent hours reformatting this whole column to show right int he first place.
I have a workbook with 2 tabs
The 1st tab has the following info
A B C
Level Acct Dollars
1 3AAAAA1,631,276.63
2 2BBBBB8,879,065.02
3 1BBBBB86.57
4 3 BBBBB234,986.25
The second tab has the following info:
A B C D
Acct Level 1 Level 2 Level 3
1 BBBBB
2 AAAAA
3 CCCCC
I want to combine a vlook up and an if statement to populate the above tab
to look like:
A B C D
Acct Level 1 Level 2 Level 3
1 BBBBB 86.57 8,879,065.02 234,986.25
2 AAAAA 1,631,276.63
3 CCCCC
I have a database containing dates and activities (text) on the speciified dates.
In some cases a date might have more then one activity therefore I need XL to (on a separate sheet?) merge the text.
E.g:
Sheet1
A B
2004-01-03Lunch with Marie
2004-01-03Reply from MrExcel?
2004-01-04Draft
Wanted 'end-result':
Sheet2
A B
2004-01-03Lunch with Marie; Reply from MrExcel?
2004-01-04Draft
I have a query and not sure if it can be done.
I did have alook across the search forum and web generally and didnt come up with too much luck only found the following [url]
What i am trying to achieve is the following
I have a list of names which i need to do a Vlookup against
the first part works fine
=VLOOKUP(C2,'[ALL_CFA Sales-IM User Profiles edited 2008_11_09.xls]Sales'!$G$2:$H$516,2,0)
Where i come stuck is that some names will be on another worksheet on the same workbook.
I.e i have done a vlookup against sales profile on the first worksheet, but some names shall be on the next worksheet as their "Job Profiles" will be different
Is there a way to extend the vlookup across multiple worksheets in the same workbook,
No two names will be duplicated across the worksheets (unless by pure chance i.e if there happens to be two Steve Smiths this will be two different people and not one indivdual)
On sheet one, I am trying to match the employees job code for that particular week in cell K2. The vlookup/match is trying to find the particular job code for that employee number for that particular week ending.
Cell A2 (sheet 1, shows their employee #),
Cell J2 (sheet 1) has that particular week ending.
Cell K2 has this formula in sheet 1:
=VLOOKUP(A2,Sheet2!A:C,3,MATCH(J2,Sheet2!$D$1:$D$5,0))
Sheet 2
Column A = employee numbers
Column C = job codes (which I need to appear in cell K2 for sheet 1)
Column D = has the week endings to match against column J in sheet 1
I want to Vlook a value from a cell in another workbook then before I get the formula result I would like it to concatenate the result with another cell.
I have attached an example
AlEXAMPLE.xls
Sheet 1
23456
23479
23409
23512
Sheet 2
23455
23456
23457
23478
23479
23480
23408
23409
23410
23511
23512
23513
In Sheet 1 there's a Column B with data I'd like to pull using a VLOOK-UP formula. However, I need it too look-up not only the exact number match in Sheet 2, but also the cell directly above it and the cell directly below it. In the sample above if I placed the VLOOK-UP formula in Sheet 2 (at for instance the numbers 23455, 23456, 23457), I'd need it to pull data from Sheet 1, Column B (for the 23456).
I am trying to do Vlook up but the reference cell indicates formula error even if this has values.
I have to do F2 in every cell to make the Vlookup work. Is there any way to remove this?
I'm going to be using a spreadsheet to keep track of where different people are at. So if Person 1 is in Room 3, I will stick a 3 in the box next to their name and then can look at the spreadsheet whenever I need and see what room they are in. When I'm deciding what room to put a person in, though, I need to be able to quickly glance at a list of Room #'s and see what one's are still available. So I have a bank of Room #'s in the spreadsheet....1,2,3, etc.
What I'd like, is some way to set this up so that when I put, for example, "3" in the cell next to "Person 1" the spreadsheet automatically removes "3" from the bank of available Room #'s and when I delete the "3" because the person has left, it adds "3" back to the bank of available Rooms.
I have a mass of data which look something like this:
table removed
and I require the ranges of reference numbers to be listed in a column one above the other, which requires inserting new rows. I also need the date & description columns copied down into the newly inserted rows.
So basically for example I would want the top row to now read:
table removed
and then apply the same procedure to the other ranges below this.
following issue:
The following table is given:
flower
20
rose
flower
21
rose
[Code] ........
Which needs to be turned into:
flower
20
22
rose
flower
31
32
blossom
tree
1
3
apple
The last column is the one that dictates when a new range of numbers start. There should be one range of numbers for Rose, One range for Blossom etc.
In Mr Excel's Pod Cast on April 12th, he showed how to use the OFFSET function to define a range inside a SUM function. Then he had Conditional Formatting that would highlight the range that was being summed. Can anyone tell me what the formula would be inside the Conditional Formatting dialog box to get the OFFSET range to have a certain format?
View 9 Replies View RelatedI have a function
VB:
Function f1(Matrix As Range)
'Does something and returns f1 = a double
End Function
And a second function which defines and constructs a matrix of doubles to use as an argument in f1 to return a double:
VB:
Function f2(dD As Double)
Dim MatrixRed() As Double
Redim MatrixRed(1 To dD, 1 To 10)
For i = 1 To dD
For j = 1 To 10
MatrixRed(i, j) = i * j
Next
Next
f2 = f1(MatrixRed)
End Function
I get an output error (#VALUE). I think it has something to do with MatrixRed not being a range anymore?
Table 1:
I like to go to Berlin.
You like to move to Amsterdam.
They want to see Chicago.
When will the reach San Francisco.
Table 2:
Amsterdam
Chicago
San Francisco
Berlin
What I want to do:
I want my function to see if the text in Table 1 contains a value in Table 2, and if yes, output that value.
Desired Result:
Row A1:
I like to go to Berlin.
Row A2:
Berlin
Row B1:
You like to move to Amsterdam.
Row B2:
Amsterdam
I have a resolution calculator that I am working on.
You put your original resolution in say 1440x1080
then below you put in any one of the new target resolutions.
Place 720 in the height and you get a message that says
"960 is your new matching Width resolution"
Id like to follow up on that with an if statment that test to see if the cell is blank if it is then null, if not then test 960 in this case to see if 960/16 = a non decimal number.
So in the cell to the right of that sentence it would return the result
"and 960 is 16 pixel safe" something like that.
I can probably figure out how I will handled the cell arrangement, numbers, and text I just for now need to find a way to do a test on whole numbers and return a text value (my guess is an if statement)
I am trying to create the function below:
View 3 Replies View RelatedI am trying to use the "MAX" function to find the max temp on a particular day in a week from 7 separate sheets. The problem I have is one particular company autopopulates their temperature block with the temp and degree symbol: 46°F instead of just 46. The max function is thrown off it appears by the symbol and letter. Is there a way to get the max function to only look at the numbers? I'm also open to the option of autoconverting each temp to a number on the master sheet and letting the "MAX" function search through those if that's possible.
View 10 Replies View Relatedtelephone codes in SA begin with the international code of 27 which when followed by a mobile number drops the zero from the Mobile numbers. eg 27722732415 without the SA code should be 0722732415. i want to remove the 27 and substitute it with a 0 ONLY if it occurs at the beginning of the number and not when it occurs in elsewhere within the telephone number
View 8 Replies View RelatedI had entered a spellnumber function in Excel 2007 and it was working fine but then all the sudden it disappeared. I would prefer a function to convert numbers to text without doing visual basic code.
View 7 Replies View RelatedI’m trying to use the SUMIFS function in Excel 2007 to evaluate the following formula:
{=SUMIFS(range to sum, range to evaluate, evaluation criterion)}
The range to sum is A1:A10, the range (dates) to evaluate are in B1:B10, and the evaluation criterion is that the date is before 31/10/1999.
So my formula looks like this:
{=SUMIFS(A1:A10,B1:B10,”<31/10/1999”)}
This works fine, but how do I refer the 3rd argument in the function to a date in a particular cell rather than typing in the date specifically?
I was just recently forced to create my first UDF and after how well it worked I now am very interested in learning more. I am trying to create a function to sort a range by the values in a specific column and return the range. I know this should be really simple but for some reason my code dies whenever it gets to my inner-most loop. I need to use this in a larger function but for now this is my only question. I did find that Excel 2007 has built in Functions for this but my company still uses 2003.
My
Public Function SortRange(rngToSort As Range, valCol As Integer)
Dim Swapper As Variant
Dim i As Integer, _
j As Integer, _
k As Integer
For i = 1 To rngToSort.Rows.Count
For j = 1 To rngToSort.Rows.Count - i
If rngToSort(j + 1, valCol) < rngToSort(j, valCol) Then
For k = 1 To rngToSort.Columns.Count
Swapper = rngToSort(j, k)
rngToSort(j, k) = rngToSort(j + 1, k)
rngToSort(j + 1, k) = Swapper
Next k
End If
Next j
Next i
SortRange = rngToSort
End Function