excel vba macro

  1. J

    Copy rows to different sheets based on multiple criteria excel VBA macro

    Sub CopyToSheets() Dim ws As Worksheet Dim ws2 As Worksheet Dim lastrow As Long Dim lastrow2 As Long Dim rownum As Long Dim ws2name As String Set ws = Sheets("RAW DATA") lastrow = ws.Cells(ws.Rows.Count, "E").End(xlUp).Row For rownum = 2 To lastrow Select Case ws.Cells(rownum, 8)...
  2. J

    Excel VBA macro to drag off the page break preview right side

    Sub Macro1() ' ' Macro1 Macro ' ' ActiveSheet.VPageBreaks(1).DragOff Direction:=xlToRight, RegionIndex:=1 End Sub I have recorded a macro to drag off the direction of page break to right, I have 30+ sheets and I want that the code to run over all sheets except sheet name "Count" & "Raw...
  3. J

    Excel macro copy from a single sheet to different sheet

    I am using the below code to copy data from a sheet to different sheets if the sheet name matches with text of column E Sub CopyToSheets() Dim ws As Worksheet Dim ws2 As Worksheet Dim lastrow As Long Dim lastrow2 As Long Dim rownum As Long Dim ws2name As String Set ws = Sheets("RAW DATA")...
  4. H

    I need an update to this code (Which I copied from an answer on a post here) that could only delete rows that have :01 and :31.

    Sub Del_Non_00() Dim a, b Dim nc As Long, i As Long, k As Long nc = Cells.Find(What:="*", After:=Cells(1, 1), LookIn:=xlValues, SearchOrder:=xlByColumns, _ SearchDirection:=xlPrevious, SearchFormat:=False).Column + 1 a = Range("B1", Range("B" &...
  5. G

    Copy Formulas, save as values and then reload same formulas

    Hello All you Excel Gurus, I need a little insight. I have a template that has multiple columns and multiple rows. Set up with accounts, subtotals and grand totals. The template will have a Rollup total section on the top and multiple regions below it. My main issue is that it will be...
  6. W

    Find and replace entry with new value and remove any not found

    Hi all I have gone through the past post find it difficult to get some help from previous post. The idea is i want to create a command button that is able to update values in sheet 1 from sheet 2. When the command button is pressed. The macro will check all the Id and update with new figures if...
  7. H

    Message box that displays content of different cell than the cell that triggered the messagebox

    Dear all, I would like to get your help with constructing my module. The idea of the module is that when a certain condition is satisfied a message box appears. This messagebox needs to display the name of the sheet, the content (value) of the cell that triggered the messagebox and the content...
  8. A

    application defined or object defined error while opening workbook

    everytime i open my workbook this error pops up:- run time error- 1004 application defined or object defined error when i debug it, it takes me to the bold line i marked in red color and says :- Cant execute code in break mode... the code pops up the userform whenever a selected shape is...
  9. J

    SQL Queries in Excel

    I have the following seven Access queries that I need to convert into an Excel macro because there is not a lot of data in the two source tables and my coworkers are more comfortable working in Excel than Access. I am not sure of how to write the VBA around these SQL queries so that it will run...
  10. J

    how to Search Sub Folders - Help Please

    Hi, I a newbie to VBA and not got much further than creating userforms (but totally addicted) and i am desperate for some help. I have some code below which i need modded to search sub folders as well. Can someone pleae help me and it is greatly appreciated. At least advise if it is possible...
  11. E

    Excel vba macro - Loop to format sheet

    Hi there!!</SPAN> I created a macro to automatically insert subtotals into a report. Now I want to include code that will format each subtotal row (bold, shaded). My idea is to have the macro search for “ Total” as a String and each time it finds that character string, format the row...
  12. D

    Average of multiple ranges based on specific variables

    Hi Everyone, I'm trying to come up with a simple macro that will scan through a list and calculate the average for a range that has a specific variable. So it would go through the following table and give me the average for all the red's and then the average for the blue, and then the green...

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