excel-vba

  1. U

    Rewrite Code as a Sub to work on Active Sheet

    Hi, Please I have this function, which is part of a a Sub macro in VBA, it replaces my old way of filtering, I want to use it as a standalone code for filtering in excel in any active sheet. By just pressing a shortcut like ctrl + w and it works on that sheet. Function FilterX(ws As...
  2. U

    REPT function excel

    Hi, Please I need excel to repeat text in a cell 2x That is REPT(text, 2) IF the text is not repeated, but if it is already repeated 2x, it should not and leave it that way. =IF(B2=REPT(B2,1), B2=REPT(B2,2), B2=B2) It gives me False, then 0 gives me true. Excel formula or VBA would be...
  3. V

    Copy data from Filtered data specific dated to another excel sheet

    Hello Sir, I have daily routine work. I am creating bank position from Bank Statement. I have 2 files (1) Bank Statement (from Data Copy) (2) Bank Position (where data Paste) I would like to create a macro which is filter bank statement data. Select and Copy data from specify date &...
  4. C

    Filter the Criteria the previous last transaction

    Have any excel VBA code that can filter criteria previous month last transaction?
  5. E

    Cannot Hide and Show Particular Sheet on VBA

    I have this code assigned to a command button (on sheet 5). My goal is when the command button is clicked, sheet 4 will be shown and other sheets will be hidden. But unfortunately when i run the code, it shows error: Run time error 1004: application-defined or object-defined error Any idea how...
  6. E

    Remove Table Row From Userform

    I have made a userform for deleting a row of data. Is it possible when i delete a row of data, the only row affected is the table row, while the same row outside the table is not deleted? For example, if want to remove Bill, test1, and 345, is it possible to make the data1 still remain there...
  7. E

    Remove Table Row From Userform

    I have made a userform for deleting a row of data. Is it possible when i delete a row of data, the only row affected is the table row, while the same row outside the table is not deleted? For example, if want to remove Bill, test1, and 345, is it possible to make the data1 still remain there...
  8. C

    VBA code need to only copy and paste visible cells, code needs to be amended

    I have written this code and it has worked until now, I am still relatively new to VBA and now having issues amending the code, I have put two VBA Code: AutoFilter to pull certain rows, but I can't seem to work out how to only copy and paste visible rows, I have tried VBA Code: Set TempRng =...
  9. R

    Dynamic "Columns:=Array(1,2,3)" in RemoveDuplicates excel VBA

    I am new to VBA. Currently I am using this, lastColumn is last column of worksheet. lastRow is last row of worksheet. It is working fine for: ActiveSheet.Range(Cells(1,1), Cells (lastRow,lastColumn)). RemoveDuplicates(Columns:=Array(1,2,3), Headers:=xlNo) - But it will work only for 3 columns...
  10. S

    Compare Two Columns in two different workbooks using VBA

    The below one has written with specific range and in the same workbook in two sheets(sheet1,Sheet2) looking for your help guys,If row range changes dynamically(no specific range) and in two different books.how to write Different way of approaching the common column in excel is also accepted
  11. V

    excel formula to find maximum within same cell having multiple values of right most numbers

    I want to find maximum and minimum for right most number from same cell having multiple values, below is the how data looks. This all values are in same cell, ex: in cell "A1" I want to extract rightmost number, like 1.00,1.5,1.5,1.0,2.00,1.50,1.0,1.00 and find max and min from it. I am...
  12. dreen

    Why are my values not copying over to another Workbook

    I have read other posts and I still can't seem to figure out what I am doing wrong... I have two workbooks, one with the code in it (Sheet1 is the codename of the sheet I want to copy values from) and another workbook defined as "y" in this example. I want to copy over the value of K1 in Sheet1...
  13. B

    excel vba save worksheet as pdf.

    I'm having issues with this code not saving my file. I get an error 1004. it worked before. does any one see any issues with this code? Option Explicit Sub SaveAsPDF() Dim strDir As String strDir = CreateObject("WScript.Shell").specialfolders("Desktop") & "\Daily Reports\" If...
  14. rediffusion

    Creating a `PopUp Menu` using 'CommandBarPopup' what other methods are there? Context Menu.

    I stumbled on this method add a `PopUp Menu` from Ron de Bruin (I olso write to him but no react). It describes how to add a "Menu" is there code to add for example "Gallery" (I'm more interested in the gallery), "ToggleButton" or "SplitButton" ?
  15. rediffusion

    `Insert Note` how to zoom in/out without manually stretching?

    Tired sometimes to pull some kind of end! How to make the whole Sheet "Excel" or set the size of 600px. I think the macro might be good! For example: 1) Point at the Cell. 2) Run the VBA macro in which the form appears. 3) In the form enter the desired size in pixels. another... 1) Point at...
  16. rediffusion

    Workbook_Open - how to combine one and more codes?

    Hi all! I duplicate this question because сouldn't find a solution. :( Cross-post is here. :warning: I have in <code style="margin: 0px; padding: 1px 5px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; font-family...
  17. rediffusion

    Run Visual Basic after starting Excel.

    I find this code on site. Private Sub Workbook_Open() UserForm1.Show End Sub It's not working. I want to open «Visual Basic» after starting «Excel» then open the window 'Module1' for example. Is it feasible?
  18. B

    Leaving empty cells if output is blank with a macro

    I have the following macro. Everything is ok with it, I just need to leave empty cell if there is no output (no values/numbers). Is it possible to do this? Can I get some help, please? Thanks. In the current code, if there is an output in the cell (eg 6), thats ok. but if there is no output...
  19. T

    How do I run a macro in Excel when the enter key is pressed on a specific cell

    I'm currently trying to create a tool that will call/run another macro/sub when the enter key is pressed on cell B4. Cell B4 will be the search field. Whenever someone types something in this field and hits enter on their keyboard I want another macro called "searchcontains" to run I've...
  20. M

    Using Workbook Functions in Excel VBA Add-in

    I am creating an add-in that adds an option to the right-click menu that will let me run my macros. I've used the functions found here but when this is saved as an add-in this functionality doesn't work anymore. What would be needed to fix this...

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