macro4

  1. R

    Multiple Filter for a Column

    Hi, I am trying to add multiple filter in a column using macros. For Example: In a column, I want to filter cells containing apple and orange but not banana or guava. So there are 4 conditions. For 2 conditions, I am able to create below code but don't know how to extend this to satisfy all...
  2. L

    Why isn't this formatting correctly?

    I am trying to create a Macro that formats each column to a particular width. But, when I run the Macro, it just sets all the columns' width to 1. Where am I going wrong? Sub Macro4()' ' Macro4 Macro ' ' Selection.ColumnWidth = 1 Columns("B:B").Select Range("B2").Activate...
  3. H

    Shorten VBA Code / Better way to write it

    Hi All, Is there a way to shorten the below code... Sub Macro4()' ' Macro4 Macro ' ' Range("B3").Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlDown)).Select Selection.Copy Range("B11").Select ActiveSheet.Paste...
  4. D

    MACRO - Specific Worksheet to save as TXT File

    Trying to save the data in worksheet name "CONCATENATE" as a text file, in the current workbook directory, same name as work book, close text file. Thanks in advance. <code class="vbscript">Sub Macro4() ' ' Macro4 Macro ' ' Sheets("Concatenate").Select Columns("A:A").Select...
  5. M

    Dim My Selection repeats

    Hi Everyone. I have a problem that if my selection is two lines or less, the two lines are repeated in the paste sheet until the sheet is full. If I select three or more lines it seems to be fine and will only paste and sort the the lines that I have selected. Can anyone help [code] Sub...
  6. P

    Macro to change cell value and print to PDF

    Hello All I need help with this macro please Sub Macro4() ' ' Macro4 Macro ' ' Range("Q2:X2").Select ActiveCell.FormulaR1C1 = "4" Range("Q3:X3").Select ActiveWorkbook.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False Range("Q2:X2").Select ActiveCell.FormulaR1C1...
  7. C

    How am I complicating this?

    just a simple copy and paste. add formula and fill down then copy, past and sort. What am I missing? Sub Macro4() ' ' Macro4 Macro Dim i As Long Application.ScreenUpdating = False i = Range("A" & Rows.Count).End(xlUp).Row For i = lr To 2 Step -1 Range("n12:n" & i).Copy Range("E12:E" &...

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