Can Vlook Function Property, When Look_up Value In 2 Cells

Aug 28, 2009

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.

View 9 Replies


ADVERTISEMENT

How To Use VLook Up Function To Look At A Range Of Numbers

Oct 26, 2012

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?

View 4 Replies View Related

VBA Error Only Comments May Appear After End Sub / Function Or Property

Mar 28, 2013

I have this code, which is producing an error that says, "Only comments may appear after End Sub, End Function, or End Property. I understand the error, but what Im unsure about is how to begin the subroutine in a way such that

1. This error goes away
2. What is the correct method name for the next subroutine
(i.e.: Private Sub Declare_Variables()

How to emcompass the subroutine. The error is happening in the below code at the "Public Cat1 as Variant", "Public Cat2 as Variant".

Code:
Option Explicit
Private Sub cmdAdd_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("View Lessons")

[Code] .....

View 4 Replies View Related

Sum Property Of The Worksheet Function Class

Oct 16, 2008

work around the sum error?


Runtime Error '1004'
unable to locate the sum property of the worksheetfunction class

Public Function CalcSheet()
Dim NoSales(0 To 11) As Range
Dim DriveOffs(0 To 11) As Range
Dim Voids(0 To 11) As Range
Dim Shortages(0 To 11) As Range
Dim tNoSales As Integer
Dim tDriveOffs As Currency
Dim tVoids As Currency
Dim tShortages As Currency
Dim X As Integer
Dim NSc As Integer
Dim DOc As Integer
Dim VOc As Integer
Dim SHc As Integer
Dim aNoSales As Integer
Dim aDriveOffs As Currency
Dim aVoids As Currency
Dim aShortages As Currency

View 9 Replies View Related

Unable To Get VLookup Property Of Worksheet Function

Aug 21, 2012

I was having an issue with my vlookups not working properly so I took out the error handler to try and find out why.

It came up with the error "Run-time error '1004': unable to get the vlookup property of the worksheetfunction class"

Below is my code. How to rectify this?

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
Dim rng As Range, cell As Range

[Code].....

View 5 Replies View Related

Average Property Of Worksheet Function Class?

Sep 10, 2012

I have some code that works just fine until I add another For statement to cycle through a list of part numbers.

The line error is:

Code:
WsStock.Cells(StartRow + Avg, j + 8) = Application.WorksheetFunction.Average(WsStock.Range("H" & StartRow & ":H" & EndRow).SpecialCells(xlCellTypeVisible))
With a message code of "Unable to get the Average property of the WorksheetFunction class".

View 6 Replies View Related

Unable To Get The Match Property Of The Worksheet Function

Mar 24, 2007

I'm trying to find the occurence of a date in a range.

Here is the code I'm using:

Windows(todaydate1).Activate

For Each cell In range(Cells(top73, 3), Cells(bot73, 3))


z3 = DateSerial(Year(cell), Month(cell), Day(cell))

Windows("Cash Flow " & todaydate & " PM.xls").Activate
Sheets("Commitments").Activate

However the code stops right on the q3 line where the match function is located. The problem is that I'm getting a Run Time Error 1004:

"Unable to get the match property of the worksheet function class"

This would lead me to believe that the match function is not working. However, in Excel, it does work. Even when using the cell from the other Workbook, it works.

All the dates which appear to be dates are indeed formatted as dates.

The range is good. I've used the immediate window to verify the address and the values of the other variables in play.

?range(Cells(toprw, 2), Cells(botrw, 2)).Address
$B$26:$B$49

Since the correct workbook and sheet is activated, I'm really at a loss here. Below is what the sheet looks like:

View 9 Replies View Related

Unable To Get The Sum Property Of The Worksheet Function Class

Jan 19, 2009

Here is the code that generates the error:

Set rng = Range("I:I")
LR = ActiveSheet.Cells(Rows.count, "I").End(xlUp).Row + 2
Range("I" & LR).Value = Application.WorksheetFunction.Sum(rng)
Range("I" & LR).NumberFormat = "#,##0"

and from what I've read on google the .SUM(rng) need to be set to a range, but isn't it already a range? I tried plugging in there Range("I:I") for rng and that didn't work either.

View 9 Replies View Related

Unable To Get VLookup Property Of Worksheet Function Class

Feb 1, 2012

The vlookup worked earlier but now it doesn't and everything looks OK to me. Scroll down a little bit in the code view to see the error line.

HTML Code:
Sub Email_Executed()
Dim OutlookApp As Outlook.Application
Dim MItem As Outlook.MailItem

[Code]...

View 6 Replies View Related

Unable To Get The Find Property Of The Worksheet Function Class

Feb 16, 2009

I am using the "Find" in VBA and wanted to test if the value searched for could not be found.

So I get the
error = "Unable to get the find property of the worksheet function class"
When the text cannot be found.

Dim zz As Variant
zz = Application.WorksheetFunction.Find("xx", "Hello", 1)

I also tried
Dim xx as boolean
xx = Application.WorksheetFunction.IsError(Application.WorksheetFunction.Find("xx", "Hello", 10))

But this produced the same error.

View 9 Replies View Related

Error 1004 Dget Property From Worksheet Function Class

Jul 18, 2007

I've noticed error 1004 is very broad and switches its name depending on what you're working with. But I have no idea what it means.

This is the line w/ probs:

Sheeti.Cells(y, 2).Value = WorksheetFunction.DGet(InventoryRange, 3, CriteriaRange)

I looked at protection and Macro security and checked my definitions (that work in other contexts).

Does DGET need to have criteria and database in the same worksheet? My project is working between two workbooks.

View 6 Replies View Related

Unable To Set Formula Array Property Of Range Class - Using Replace Function

Mar 3, 2014

I'm looking to loop a comparison code. I'm using dynamic referencing (using x and y) to find maximum values for specific time intervals. The code works on a cell to cell basis, meaning if I input the formula and change the cell referencing manually then the equation will give the desired results. However when I attempted to create a VBA code to speed up the process I kept getting a 1004 Unable to set FormulaArray Property of the Range Class error, I later figured out that the Formula Array function is limited to a certain number of characters so I split up my function into 3 different string formulas. I still get the same error.

[Code] ............

View 1 Replies View Related

How Do You Select A Range Of Cells On Another Worksheet Using The Cells Property

Apr 19, 2007

I seem to be going round and round in circles with this, but I'm sure it should be easy.

I'm just trying to select a range of cells in Sheet2 of my workbook.
I've tried many different bits of code, including:

Dim namesTotal As Integer

namesTotal = 2500

Sheets("Sheet2").Activate
ActiveSheet.Range(Cells(1, 1), Cells(namesTotal, 8)).Select

(According to the Microsoft website, this is supposed to be the way to do it?)

View 10 Replies View Related

Referencing Range With Cells Property?

Jan 8, 2014

I have been stuck in this piece of code. Depending on what I try, I get instances of 1004 run time error.

When this code is running, the sheet is not the active one. I tried to activate as well, with no success.

Code:
Sub WriteRankData(Region As String)
Dim i As Integer, z As Long
With shCurrentYear
For i = 9 To 41 Step 4
If .Cells(1, i) = Region Then

[code]....

View 1 Replies View Related

ComboBox Error "Could Not Get The List Property - Invalid Property Array Index" When Typing Out Of Range

Jun 9, 2006

I have a form with several combo boxes, and they function just the way I like as far as being able to pick from the list, or typing in them and having it show you the next available item in the list as you add letters. Whats happening that I would like to know how to deal with is... as soon as you type a letter that is not in my lookup range it generates an error. "Could not get the list property - Invalid property array index". I don't want people to be able to add to the list, but I would like a msgbox to pop up. Then allow them to go back to the box and try again.

View 2 Replies View Related

VLook Up From Across Several Worksheet

Nov 30, 2009

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?

View 11 Replies View Related

Vlook Up And Zipcodes

Mar 9, 2009

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.

View 6 Replies View Related

Combining A Vlook Up With And If Then Statement

May 2, 2006

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

View 14 Replies View Related

Merge Text Using IF Or VLOOK?

Oct 24, 2003

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

View 9 Replies View Related

Vlook Up Across Multiple Sheets

Nov 13, 2008

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)

View 9 Replies View Related

Code Changing Color Property Of Wrong Cells?

Apr 14, 2013

I have this code:

Code:
If .Range("K" & t) = "AUTO" Then
.Range("K" & t) = Format(Application.VLookup(.Range("A" & t), rcore, 54, False), "h:mmA/P")
With .Range("K" & t)[code]....

It is intended to change the font colour to white when the cell = "AUTO". It does, but it also changes the contents of the cell (like NA, and NR) to white when they aren't equal to AUTO.

View 2 Replies View Related

VBA - Cells Property Failing - Object Does Not Support This Method

Jan 5, 2010

I am trying to use the Cells Property in VBA but it is not working and I cannot figure out why for the life of me. Below is my ....

View 9 Replies View Related

VLook Up Match Multiple Criteria

Mar 8, 2009

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

View 2 Replies View Related

Vlookup & Concatenate (Vlook A Value From A Cell In Another Workbook)

Mar 20, 2009

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

View 2 Replies View Related

Vlook-up Exact Number Match In Sheet

Dec 19, 2008

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).

View 9 Replies View Related

Vlook Up But The Reference Cell Indicates Formula Error

Dec 30, 2009

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?

View 9 Replies View Related

Worksheet.function Average Returning Error "Unable To Get The Average Property Of The WorksheetFunction Class"

Jan 23, 2007

TotHCInv.Value = WorksheetFunction. Sum(KRInv, PBLInv, CRInv, PVInv)
If i >= 34 Then CPSCtphRMA.Value = WorksheetFunction.Average("G" & (i - 30) & ":G" & i)

The first line runs properly, but the second line bugs out with the error message "Unable to get the Average property of the WorksheetFunction class". I can simply do the math, but I thought that using the worksheet function would be easier than summing and dividing. I'm curious, though, as to why I can't seem to use the Average function.

View 3 Replies View Related

Specialcells Property Error "Unable To Get The SpecialCells Property Of The Range Class"

Apr 14, 2007

Having problems with trying to get my vba code to access the SpecialCells property. Receiving the following error.... Unable to get the SpecialCells property of the Range class. The section of my code is below that is causing the error. Keeps stopping on the "Selection.SpecialCells(xlsCellTypeVisible).Select" line.

Sheets(" Book Query").Range("A6:I6").Select
Sheets("Book Query").Range(Selection, Selection.End(xlDown)).Select
Selection.SpecialCells(xlsCellTypeVisible).Select
Selection.Copy
Sheets("Inventories and Variances").Select
Sheets("Inventories and Variances").Range("A7").Select

View 2 Replies View Related

"Unable To Set The Hidden Property Of The Range Class" When Unhiding Cells

Oct 30, 2009

I'm trying to unhide all the cells in a worksheet, but keep getting the "Unable to set the Hidden property of the Range class" error and I'm not sure what to do.

View 2 Replies View Related

VLook Up Specific Text Within Text And Output Match From Table

Dec 3, 2009

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

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved