rangeselection

  1. S

    VBA Coding to select cell under Headings when using filter

    I am using a filter to show all "BB" transactions and delete the rest of the rows that are not "BB". Here is what I recorded when I did it: 'Set autofilter on Column E for "BB" and delete all other rows Range("A1").Select Sheets("PPDR_BB").Select Rows("1:1").Select...
  2. V

    Macro help

    Hi, I have recorded the below macro. However it is taking loads of time to run. Is there a way to ensure macro will delete old data on the file (with click of a button) and let the user start a fresh. Same time it won't take time to run. The vlookup should be done only if columns C as value...
  3. earthworm

    Loop help required to run another macro

    I have numeric values in another sheet by the name of summary. If cell value in summary sheet example F5 is > 0 or less then 0 or <> 0 only then i want to run the macro for that particular company . The problem is if i use if condition it stop running the second macro if the first value is...
  4. B

    Pivot table not updating - VBA

    Hi All, Hope you can help me. I'm trying to automate the creation of pivot table. However, when there's new data, it does not capture when running the program again. Here is the code: Sheets("QA Error Correction Tracker").Select Range("A1").Select Range(Selection...
  5. K

    Conditional formatting Macro not working as intended.

    Hi there, This is the macro code that I am using to apply conditional formatting: Sub Iden_Match() ' ' Iden_Match Macro ' Identify matching cells ' ' Keyboard Shortcut: Ctrl+Shift+K ' Range("H3").Select Range(Selection, Selection.End(xlDown)).Select Range(Selection...
  6. D

    AutoFilter and deleting blank rows

    I wrote this macro, but I feel like it can be written better, I used the macro recorder to write. Any suggest of how to delete what is seen on the screen instead of the selection.end down and right? I am filtering any blanks in Col 6 and delete all these blank cells based on the blanks in Col 6...
  7. S

    Select the range of cells which contain Merged cell in between

    Hai Dudes, I would like to select the range of cells in one row which contains some merged cells in between. The macro has to be run for many files with different range of cells. For example File1 has to be select from C5:C10, file2 has to select from C5:C20. There are some cells merged in the...
  8. T

    VBA - copying column data from one workbook to the other and pasting in the last cell of a column in the new workbook

    Hi, I'm trying to copy column of cells from on column from one workbook to another column on another workbook and paste it in the last blank cell of that column in the new workbook, below, all the data should be pasting in the last cell of each column, most are pasting correctly but some are...
  9. 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...
  10. N

    Macro hard coding cell reference when creating a table

    Hello, I am trying to set up a macro that will select a varying amount of data and then format it into a table. I'm selecting the data using the ctrl shift keys to get to the end cells however when I create the table it locks in the cells from the original selection so the table size is static...
  11. T

    Missing code

    In the below formula, I'm missing an important code that I'm at a loss to figure out. 'Delete unused formulas column J Range("J3").Select Range(Selection, Selection.End(xlDown)).Select ?????????????? Range(Selection, Selection.End(xlDown)).Select Selection.ClearContents...
  12. J

    VBA to increase cell value by 1 and loop code

    Hi all, I have the code below that works as needed, but I'm looking at enhancing it further. I want run the code below, and then have cell F5 increase by 1 and then rerun the code below. I want to do this until F5 hits 40. Appreciate any help and assistance. Range("P8").Select...
  13. B

    Selecting rows of a range (similar to typing Shift+Spacebar)

    I can't figure out how to select the rows of a range. I want to do something equivalent to hitting Shift+Spacebar I have used the following code to select a range (equivalent to using shift-Ctrl-down) Range(Selection, Selection.End(xlDown)).Select I now want to select the entire rows...
  14. A

    Pivot Table VB Code Simplify

    Cross post https://chandoo.org/forum/threads/pivot-table-not-to-show-blank-fields-and-dynamic-print-area-autoset.40764/ Can someone please help to simplify following vb Code Sub Macro1()' ' Macro1 Macro ' ' Sheets("Report").Select Range("B9").Select...
  15. K

    Better Way To Write This Code

    I have this code: Sub CopyPastefoo2() ' ' CopyPastefoo2 Macro ' ' Sheets("RawData").Select Range("A2").Select Range(Selection, Selection.End(xlDown)).Select Sheets("DataCalcs").Select Range("AF2").Select Range("AF2").Formula = "=IF('RawData Old1'!A2=0,""Base Bid""...
  16. W

    VBA Shift+Up arrow after CTRL+Shift+Down arrow

    After using CTRL+SHIFT+Down I need to use SHIFT+UP, SHIFT+UP In VBA I am using Range(Selection, Selection.End(xlDown)).Select Range(Selection, Selection.Offset(-2, 0)).Select I thought this would work, but it adds two rows to the top of the range, when I really need it to remove two rows...
  17. W

    CTRL+SHIFT+ARROW VBA Multiple Times?

    What is the equivalent VBA? For example I need to select 9 columns to the right of my starting point, 5 columns contain data, the other 4 columns are blank in between each of the 5 columns. If I use Range(Selection, Selection.End(xlToRight)).Select it only seems to move to the right once...
  18. W

    Basic Fixed Loop Macro

    I am trying to learn loops. My vba code is: Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection...
  19. H

    Excel VBA Code Sort Left to Right - Please Help!

    Hi There - I am trying to add code to an existing Excel VBA Macro that sorts the attached file left to right. However I need the number of columns and rows to be dynamic. Basically I need you to start in cell F1 and ctrl+shift RIGHT and ctrl+Shift DOWN to select the datarange and then sort...
  20. M

    VBA: If Auto filter has no data then it has to move to next filter

    Hello Experts, Requesting you to review my macro. i have tried little bit and i am new to this so please help me out. I want to save the file into two different format based on criteria that i have done. but while filtering if no data for that respective criteria then it has to move to next...

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