cells1

  1. F

    Run Macro using batch file

    I have a macro that I would like to run externally using a bat file. I would have done this using vbs but with the company policy it doesnt work. Here is my code below. I want the code to be run externally because in the coming months, I wont be the one to run the code and I would like to make...
  2. bobkap

    IF w/Not Equal?

    I am trying to delete columns if the header of the column is NOT a header containing the word "Transaction Status" and other headers, but when I run this (below) it doesn't delete columns based on these criteria. It deletes every column. Any help on what I'm doing wrong would be greatly...
  3. D

    Duplicate Entries

    Hi again. I would like to prevent duplicate entries to be entered into a spreadsheet when attempting to add with a error message saying "Duplicate Entry". VBA Script below; Private Sub ScanTB_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean) Dim LastRowFilled As Long Dim DataArray(1...
  4. A

    My one week effort code, can you check it up ?

    Hey there :) I have been busting my A** out in the last week to generate one consolidated report from two different reports i know it may look simple but i just learned vba one week ago haha.... anyhow, first i would like to thank everyone here for their support. second, can you please...
  5. F

    VBA- cleaning up code/making it more efficient

    Hi everyone, Thank you, in advance, for any help! I jumbled together this code which does what I want, however, it is very slow. Could you please help me to identify how I can make this more efficient and effective? I have multiple spreadsheets with similar and different data, that needs to...
  6. W

    minimize worksheet but not input box

    So I would like to automatically run an auto filter when a wb opens. and this code does, but I would like the main screen not displayed. this code hides both the xls and the input box. Any ideas on how to only view the input box? Private Sub Workbook_Open() 'Setview...
  7. S

    Speed up code that copies value to a table from a Gantt model

    Hello I have a simple code that extracts values from Gantt model to a normal table. The Gantt model is on a per day basis and can be user define to how years needed for a project so it can become alot of days plus there will be a fair few rows with data. So to create a more interactive output...
  8. P

    Copy all Duplicates to the bottom of Active sheet

    Hello, I have searched and found this code to move the macros to another sheet, but I sort of modified it to move to the bottom of the activesheet. My question is how do I stop so many blank rows from coming between my last row of data and the duplicates? And more importantly, how do I...
  9. L

    VBA Macro for Single Button w/different Message Results

    Good morning all, I am new to VBA, had a single class a few days ago. We have an assignment and I'd like to ask for some help to review and wrap my head around it. Below is the module I started, but obviously needs some help. Any tips on sequence and how to make it work would greatly be...
  10. W

    minimize Excel but view input box.

    When using he code below it also minizes the input box. I want to keep the input box viewable. Sub MNMZ() ActiveWindow.WindowState = xlMinimized 'want to keep this visable Range("A2").AutoFilter 1, InputBox("Please Enter Site #") i = Cells(1, 1).End(xlToRight).Column...
  11. V

    Userform formulas not working if updated

    Hello, I am creating a workbook where the user inputs data with 17 userforms. The first four userforms always show up. On the first userform I have 13 check boxes which determine if any of the other userforms are activated. If the checkbox is selected the associated userform will become...
  12. O

    VBA Cell Formula to Name Range

    Thanks in advance for any suggestions for which I will give feedback. I am trying to set cell to a formula involving name ranges. Where, for example cell D53 [Cell(53,4)] formula would be = V1.Total.NPV10 + V2.Total.NPV10 + V3.Total.NPV10 + V4.Total.NPV10 + V5.Total.NPV10 since the value in...
  13. tyija1995

    Macro Improvement on Execution Time

    Hi all, I have made a macro at work to basically calculate the maximum length (of a cell) for each column in a table with header row 1 (used for SQL truncation purposes... I.e. "Job Title" may have type nvarchar(20)) The macro works all well and good but it can be pretty slow when dealing with...
  14. J

    Link a sheet name to a cell

    I have an error in my code but I don't know where... The thing is that I never know which name will be in the cells and I want it to be linked to the name of the sheet. I always have an error on line 6 but I don't know why. This is a part of my code: For x = 0 To 10...
  15. M

    Target.Value dont work with cell containing RTD function that display streaming stock price.

    Im testing the following code empty excel sheet: --------------------------------------------------------- Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$1" Then If Target.Value > 280 Then Cells(1, 2) = 99 End If End Sub...
  16. P

    VBA Copy macro not pasting onto another worksheet

    Hi, first time poster here. I have cobbled together a script (from other sources originally) that selects row(s) containing a tick in column E (Marlett Font 'A' character) copy this/these row(s) and paste it/them into the first empty row(s) in another sheet. The script behaves almost as...
  17. H

    vlookup vba

    Hi All, I'm trying to pass the value of lookCol in the lookup formula here but getting an object defined error here. Can someone please help me with this lastCol = Cells(1, Columns.Count).End(xlToLeft).Column lookCol=0-lastCol Cells(i, curCol).Value =...
  18. R

    Problem in getting PasteSpecial together with Unicode text to paste where I want.

    I can get :- ActiveSheet.PasteSpecial Format:="Text", Link:=False, DisplayAsIcon:=False to work. But setting the active cell is not straightforward. Workbooks("myBook").activate always works but Cells(1, 1).select (and Cells(1, 1).activate) sometimes work but are both unreliable. Can...
  19. B

    Last Row

    Good afternoon Could someone provide an explanation why the below endrow variable is not locating the last row of data in it's current position in the script. It stops format before the last row. This maybe an easy one, I am unable to see it. Sub FormatRange() Dim endrow As Long endrow =...
  20. L

    passing Range name as an argument to WorksheetFunction

    Hi The code below for some reason does not work. I tried to pass the range between " " but did not work. Any help would be appreciated ' did not work either Cells(1, 3).Value = WorksheetFunction.Sum("myrange") Sub worksheetfunctions() Range("a1:a20").Name = "myrange"...

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