type mismatch

  1. L

    VBA to use activesheet selection in Transpose

    Hi I am using the built-in function Transpose to convert an array to a string and would like to use the current selection ie change this Comments = Join(Evaluate("TRANSPOSE('Base'!A1:A10 )"), vbNewLine) to Comments = Join(Evaluate("TRANSPOSE(Selection )"), vbNewLine) The latter gives a...
  2. Z

    Type Mismatch error when having user select files

    Hello, I have the following code, which opens up a dialogue box and allows the users to select 1 or more files at once. If the user does not select any files (i.e. they hit cancel), I want the macro to end. The code below works if the user does not select any files, however, if they do I get a...
  3. S

    VBA: Run-time error 13: Type mismatch

    Hey everybody. Error 13 (type mismatch) occurs when I try to run this macro. Nevertheless, I can't find out which data types are incompatible. Could you help me to find it out, please? Here is the code. Public Sub Macro1() Dim m, n, p As Double Dim x1, x2, xmin, z As Double m =...
  4. G

    Error running this code - If ActiveCell.Value = "#N/A"

    Hi, hope someone can help. I'm trying to run this code but when the cell value is "#N/A# I get an error 'type mismatch', note that the cell value is text not the formula =NA(). If ActiveCell.Value = "#N/A" Then ActiveCell.ClearContents ElseIf ActiveCell.Value = "Error" Then...
  5. J

    Type mismatch on cell values after VBA update

    Hello all, I'm hoping to get some help with the following issue. I've written a set of macros around a few worksheets that I analysed for a thesis project. The project is now finished but I'm doing some follow up work and thought it would be safe to update my Office 2016 for Mac now. After this...
  6. D

    Type Mismatch issue

    Hi all. I have a userform with 3 TextBoxes (ones having an issue anyway) to adjust the value in the respective cells on an Employee Information worksheet. The Balance is shown as a label.Caption using Application.VlookUp for the employee shown in a ComboBox called Reg2. Reg9, Reg10 and Reg11...
  7. X

    Index with multiple match (Loop) when one of the Match is a Date ( VBA ) - Value Mismatch

    Hi I am trying to do index match Loop through Columns first and then Rows with multiple criteria in VBA My Source data is like: <tbody> Date email ID Attendance Status 22/08/18 Bob22@tiptop.com Present 22/08/18 Milan@tiptop.com Present 22/08/18 Samuel@tiptop.com Present 23/08/18...
  8. T

    [Run-time error '13': Type Mismatch] Returning New Custom Object

    I had this working yesterday and earlier this morning so I'm not sure what changed. ConveyExtract and BillingValidationExtract are both custom objects I've created that both implement a class called Extract. I have the following line getting slapped with a Type Mismatch error: Function...
  9. A

    Type Mismatch

    Hi there. I am an occasional VBA programmer and have run into a type mismatch problem that has me stumped. I am using the ancient 2007 edition of Excel (not my choice) and the following code in my macro works: Set rngCohort = wsScrap.Range("A1:A" & lngScrapLast) varCohort = rngCohort.Value...
  10. A

    Run-time error '13': Type mismatch

    Hello everybody! I got some amazing help last time I posted, so I'll give it another go. I'm still very new to coding in excel and find myself stuck with a Run-time error yet again. This is the code I'm working with: Private Sub Worksheet_Change(ByVal Target As Range) Dim n As Long If Not...
  11. G

    Run-time error '13: Type Mismatch

    I am trying to do a dynamic "Hide Rows" function where if a certain cell in a row has any value a number "1" will populate the A cell of that row, an example would be if cell B11 has value A11 will be equal to "1"... What I had the macro doing was hiding all rows where A = "" The code had been...
  12. M

    Issue With Proceeding Only if Object Exists

    Hello, I am attempting to generate an organized list of all entries from multiple sheets which have a date, description (vendor), cost, category, and subcategory. I am looking to have them sorted by the date based upon their description (vendor), and to display the original date, description...
  13. M

    Need to select different columns from one sheet and paste them into another sheet

    Hi Experts, I need to Select certain columns from one worksheet and copy them into a different worksheet, since the number of records may vary from one day to the other, I'd like to make my selection dynamic, so I can copy and paste all the records, no less no more, I've tried with this code...
  14. T

    VBA Type mismatch

    Hi, I get a type mismatch in my code. when i reference to another cell. What have i tried: 1. I have entered the number that is in the referenced cell manually (see red below). Now the code works fine. 2. In a new excel sheet i have isolated and tested my problem and there i don't get a type...
  15. andrewb90

    Run Time Error 13 in one WB but not the other

    Hello all, I am getting a run time error 13 in one particular workbook, but not another. I'm not entirely sure what could have changed, but I know its not the code in the sub. I copied the same code from another workbook that the code is functioning properly and resulted in the same issue. If...
  16. J

    Run Time Error 13: Type Mismatch

    Hi, I am receiving a "Run Time Error 13: Type Mismatch" with the following code. Any thoughts? I cant figure out what to do. On this line: Ins = Sh.Cells(n, "A").Value Sub InsertRows() Dim End_Row As Long, n As Long, Ins As Long Dim Sh As Worksheet For Each Sh In...
  17. T

    VBA VLook Up Type Mismatch

    Hi I have a range on a worksheet that I wish to restrict to a number of users based on their application name but, based on the following if the User Name is not in the range, a type mismatch is returned: Private Sub Workbook_Open() Dim strUserName As String strUserName =...
  18. C

    Macro Generating Run-Time Error 13 Type Mismatch

    Hi, Can anyone help me with a macro which was previously working, but when I have move to another PC the macro appears to be generating a Run-Time Error '13' Type Mismatch. I have highlighted in red the text which is where the macro is throwing this error. I just don't know what the problem is...
  19. T

    Type Mismatch Error

    Hi I'm trying to put this in a cell: =COUNTIF(OFFSET(project_planner_range,0,$C$8), " >= " &E14)-COUNTIF(OFFSET(project_planner_range,0,$C$8), " >= " &G14) This is what I put in VBA: Public Sub Largest_to_Smallest() Sheets("Project Planner").Range("B14").value...
  20. B

    error using SET object to a frame on a userform

    Excel 2016 ProPlus (but the problem occurs in Excel 2013 as well) I have a userform with a number of Frames on it that that are layered on top of a "baseline" frame that has command buttons on it for selecting the Frames to be overlayed, exposing additional controls to the user. When I activate...

Some videos you may like

This Week's Hot Topics

Top