I've tried these three call formats, none work (runtime error)... what am I doing wrong? Thanks in advance
Application.WorksheetFunction.VLookup(Cells("A1").Value, Range("airport list!B:C"), 2, False)
Application.WorksheetFunction.VLookup(Cells("A1").Value, Sheets("airport list").Range("B:C")...
Hello Everyone!
How to nest the long excel formula in vba using WorksheetFunction?
Here is my goal...
I need to convert the following into Minutes
Column A - Column B(mins)
0Day(s), 5Hour(s), 25Min(s) - 325
4Day(s), 7Hour(s), 11Min(s) - 6191
7Day(s)...
Having tried for hours to work out the solution myself I am throwing in the towel, can anyone please help me out? I will be doing this many times so would like to avoid using pivot table and copy paste from that.
So I am trying to use VBA to go through a document and delete all duplicate rows...
Hello,
I wanna achieve this:
SliceArray= Worksheetfunction.Index(varArray, (Array(2, 4, 5), 0))
in a more generic style like this
Function SliceArray (p_lngStartRow as Long, p_lngEndRow as Long) as Variant
Dim varSubArr() as Variant
Dim i as Long
ReDim varSubArr(1 To (p_p_lngEndRow-...
I am working in a macro and for the sake of speed would like to use the Excel UPPER() function instead of VBA's UCase(). I am failing to find it among the Excel objects. I thought it might be part of WorksheetFunction, but that is not the case. Is it useable from VBA?
I’m writing a very large VBA macro to analyze data from multiple worksheets. All my functions are used in the following form (example):
ReDim TotVAKWNAArray(1 To 5)
For bCount = 1 To 5
TotVAKWNAArray(bCount) = Application.WorksheetFunction.CountIfs(Range("D:D"), VAKW, Range("AW:AW")...
When using a function within my code I can not figure out the logic of when to use WorksheetFunction and when not.
As test shows below, Sum() needs WorksheetFunction but ABS() fails with WorksheetFunction.
I usually figure it out by trial and error, but would like to understand the logic. I...
Hi,
I was quite a few problems using worksheetfunction.ln() to calculate % change. I decided to write more basic code to try to accomplish this but I'm getting an overflow error. Can someone tell me how to fix this.
DRows = WorksheetFunction.CountA(Sheets("INFO").Range("A:A"))
For r = 1...
I'm try to use the StDev function to calculate value. This is what I have so far but I continually get errors.
Any thoughts on whats going wrong with the following code?It's saying StDev is an invalid qualifier.
rngcorrel = Worksheets("config").Cells(32, 2)...
Hi,
I have 2 sheets. Sheet 1 contains rows with orders. Each order has multiple products. Sheet 2 has the prices of those products, with in each column a different country (thus different price) and each row an other product.
For each order I'm trying to calculate the price for of all products...
I'm a little over my head here and was hoping someone could help.
I was just given a three spreadsheets:
1) The first spreadsheet is just a collection of macros used to perform some automated calculations and formatting to a set of data.
2) The second is a collection of raw data. The...
The following Vlookup in my VBA code appears not to evaluate and I do not understand why:
varResourceId = Application.WorksheetFunction.VLookup(strResourceName, ResourceTbl, 2, 0)
Worth Noting:
1. If I enter the formula [=VLookup(RC3, ResourceTbl, 2, False)] into a cell, the cell is...
'Unable to get the StDev property of the WorkSheetFunction class'
Ok guys, this error isn't too difficult (I don't think)...
I have problems with my newSTDEV function when a worksheet only has one line of entered data in it. I believe it's because you can't take StDev with only one value so...
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I was wondering if some could possibly help me with sumif function in vba. I have two ranges that have been declared in the code as Range1 and Range2 and the criteria I wish to determine by is...
Hi all,
I'm hoping somebody out there can help me with this.
I currently have a macro that loops through a series of cells and populates them off a table stored in another sheet. The segment of the current code is below:
On Error Resume Next
Dim lookup_val As String
For x = 12 To 36...
Hey guys,
I am developing a function that does a couple of things. First, the user specifies player names in 'Scores'!A1:A1000, and then various statistics in 'Scores'!B1:G1000. The function loops through these entries, and then updates the corresponding cells in the 'Lifetime Statistics'...
So, I use to be a lot better with Excel, but it's been quite some time, and I'm in Dire need of help.
Here's the issue: I have a spreadsheet with 12,000 contacts in it (name, email, phone number, country, industry, etc etc). The sheet is kind of messy, and I want to clean it up. One way thing...
I am getting a type mismatch error trying to run a vlookup in VBA. The lookup range is in a different workbook. Relevant piece of code is below (wbkHarvester is declared and Set in another global module). Any suggestions? Thanks - Alicia
Dim intExchange As Integer
Dim strCampNum as...
Hi All,
I'm trying to assign the number of cells (blank or non blank) in a given range to a variable but everytime I try, I get a runtime 1004 error.
Can you help?
Dim strStartingConCell As String
Dim strStartingUniqueCell As String
Dim x As Integer
Dim y As Integer
strStartingConCell =...
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.