ans

  1. E

    Code now will not run

    Using Excel on MAC (Latest) My program worked fine a few days ago. I haven't done anything but now the start up macro fails. The error is:- Run Time Error '6' Overflow This is the code Sub MG01Apr57() Private Sub Workbook_Open() Dim Ans As String Ans = MsgBox("Update the Invoice Number"...
  2. H

    Questions on conditional formatting

    Hi, Possible to use conditional formatting to 'sum count' font colour? 1 2 The ans should be 2 'count'
  3. D

    Type mismatch

    When I open my spreadsheet and delete contents out of a cell, I get a type mismatch error. This is my code: Private Sub Worksheet_Change(ByVal Target As Range) 'ActiveSheet.Unprotect Dim ans As String If Not Intersect(Target, Range("A:A,B:B")) Is Nothing Then...
  4. R

    VBA Beginner

    I am working through EXCEL VBA Programming for Dummies from 2004. I am getting the "Compile error: Variable not defined" pop-up. Below is what my code looks like and it is verbatim as the example in the book. I know the problem has something to do with the "Option Explicit" at the top and...
  5. Z

    Nested If....Then...Else statement

    Hi, I'm getting an error (else without an if) on the following if then else statement: Private Sub Worksheet_BeforeDoubleClick(ByVal target As Range, Cancel As Boolean) Dim Ans As Long If target.Value = "" Then If target.Offset(0, -3) = "" Then usf_Main.Show Else: Ans...
  6. M

    SearchRange.Offset, deleting row

    after performing the below, i want to be able to delete the row on the sheet "database" and shift the data up one row so it isn't empty row there, and for the life of me no matter which way i try it i end up clearing the entire sheet Any guidance would be appreciated lastRow =...
  7. R

    How to output the result from existing sheets to new worksheet

    How to output the result from existing sheets to new worksheet ? What is the code in need to add in ? [Sub MissingHobbies()Dim c As Integer, h As Integer, ans As Integer ans = 9 For c = 2 To 11 ' candidates For h = 3 To 6 ' hobbies Cells(8, 1) = "Hobbies" Cells(8, 2) =...
  8. R

    Output error with VBA

    Based on the data and output at https://ibb.co/qNmx8Lz What is the error that caused error at 3rd column of the output ? Below is the code that I have been using Sub MissingHobbies() Dim c As Integer, h As Integer, ans As Integer ans = 9 For c = 2 To 11 ' candidates For h = 3 To 6 '...
  9. R

    Returning Missing Variables on A Merge Cell

    Hello members, I need your kind assistance with regards VBA. Attached herewith is the sample data,together with the output. For this questions, There are 5 candidates in the list and each of them will take part on their favorites sports during weekday or weekend. If they participate in a...
  10. M

    Type mismatch error when no values added

    Hello again I have the code below working that someone wrote for me. It works great, but when a textbox on the multipage is blank I get a Type mismatch error. I've tried writing an error check and everything, but I just keep getting errors. Does anyone know how to make it so that when the text...
  11. Ironman

    How do I combine these 2 procedures into one?

    Hi I currently have 2 separate procedures, 1 of the procedures runs for each sheet, that insert the same symbol into a cell in either Column I of Sheet "Training Log" or Column K of Sheet "Indoor Bike" (the code for the symbol insertion is identical for both sheets). The only difference...
  12. Ironman

    Simple amendment needed in code

    Hi The below code was kindly provided to me some time ago.Sub GlobalCommentsCell() If ActiveSheet.Name <> "Training Log" Then Exit Sub 'If Selection.Value <> "" Then Exit Sub If Selection.Column <> 9 Then Ans = MsgBox("This routine will only work in Column I!" & vbNewLine & _ "Would...
  13. B

    help with vba

    hi i need help adding somwthinf to thios vba sub SaveFile2222() Dim ans As Long Dim sSaveAsFilePath As String mybook = ActiveWorkbook.Name On Error GoTo ErrHandler: If Len(mybook) > 25 Then mybook = Left(mybook, 25) End If sSaveAsFilePath = "C:\Users\jack\Desktop\AAAA\" &...
  14. G

    Compile error :”End with without with” – please help

    Hi Guys J, Could you please look at the below and help me? When running it I am getting the above error message. In advance, Thanks a million. GizmoL. ' email Macro Set oOutlook = CreateObject("Outlook.Application")Set oNameSpace = oOutlook.GetNameSpace("MAPI")oNameSpace.Logon , , True ans =...
  15. D

    Help with VBA code

    I want to have a message box pop up if the date entered in column A of a table row is earlier than todays date, I have some code but it only seems to sometimes work. What is wrong with it or is there better code? The table's name is npss_quote Private Sub Worksheet_Change(ByVal Target As Range)...
  16. C

    Upgrade to 365 and not finding project or library

    Hi Guys, At wok ad we just upgraded to Office 365, the code below worked great before upgrade, but now I get a compile error to find the project or library on the word "Format" on the "sname" line. It basically formats the date (A4) in a cell copies it and merges it with AM or PM from B4 2 on...
  17. E

    How to use personal macros that will work each time any excel file closes

    I've writtenamacro in my whose purpose is to ask me, when I try to close thefile, whetheror not all tasks have been completed within that specificfile. Rather than addthis to the numerous excel files I get into each day, I'dlike to add it to mypersonal workbook. The problem I’m having is that...
  18. M

    VBA Custom Filter

    I am trying to do a filter where either I select records where field 18 equals the variable Ans and field 22 equals Ans4 OR I want to select records where field 30 equals the text "Other" ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=18, Criteria1:="=" & Ans...
  19. E

    Help with formula for simple payroll

    <tbody> weekly salary ee er weeks salary 200-339.99 11.9 23.8 4 340-449.99 17.4 34.8 450-609.99 23.3 46.6 610-759.99 30.1 60.2 </tbody> hello so i need aformula to say if my salary is 600 then use ee b3 also multiply ans by d1
  20. D

    How to suppress an error message

    I have the following code that deletes rows in a table. When I get down to nothing in the last row and press the button again, I get an error message saying there are no cells found. How do I suppress that message so nothing will happen? Private Sub cmdDeleteRow_Click() 'ActiveSheet.Unprotect...

We've detected that you are using an adblocker.

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.
Go back
Back
Top