rangeselection

  1. B

    Range(Selection, Selection.End(xlDown)).Select

    Hi, i have encountered a problem to select the columns from B4:E4 to P4:T4. Below is my intial code but it does not work. Union(Range("B4:E4"), Range("P4:T4")).Select Range(Selection, Selection.End(xlDown)).Select Selection.Copy 'P Call uidoc.Paste Please help!!! I need to use...
  2. P

    Filter when name not found goes on a loop

    Hi good morning, I have the code that works great apart when the name cant filter on the name I M2, it goes on a loop about times, until it finally stops and highlights empty fields, is there anyway t stop the loop and return nothing straight away instead? Private Sub dofilter()...
  3. K

    VBA to search for column by header name and remove duplicates

    Hello, I have the existing code, and it basically copies and pastes values from a data table and then keeps all the columns I need by header name. I have duplicates removed based on Column 3, but sometimes the original data is not sorted the same. Is there a code where it searches by column...
  4. T

    How to make this VBA loop run quicker?

    Hi All I've recorded a macro then looped it, but it runs so slowly (takes around 45 minutes to complete). I've got a feeling it's so slow because it has to copy and pastes 12 images (barcodes) 537 times, but is there any way of using different syntax to make it quicker? Here's the code: Sub...
  5. M

    Simplify Macro

    Range("A6").Select Range(Selection, Selection.End(xlDown)).Select Selection.FormulaR1C1 = "0" Range("B6").Select Range(Selection, Selection.End(xlDown)).Select Selection.FormulaR1C1 = "0" Range("C6").Select Range(Selection, Selection.End(xlDown)).Select...
  6. G

    VBA Macro crashing Excel.

    Hi All, I've recorded a macro to copy a sheet and save it as a new file, with a few modifications (copies values over a pivot table, formats a few cells). The macro works well, when it works. About half the time, it just crashes excel, with no error message or anything. When it works, it...
  7. K

    Expand Range until the first occurence of a specific text - VBA

    Good Day Folks I have been trying to expand my selection until the occurrence of "Total"(not including) in the same column. The below code gets me to the cell above the occurrence of "Total" but doesnt expand my selection. Range(Selection, Selection.End(xlDown)).Find("Total", , xlValues...
  8. K

    Sorting macro

    Hi, The below macro does not help me to sort data. Can someone help me in to sort the data through macro or correct the below coding and help me to identify what the mistake is. Sub sorting() ' Sorting Macro 'CODING TO CHECK THE NETTING UPLOADED MsgBox "open Netting uploaded...
  9. B

    Insert table function when range changes

    Hello, I am trying to use the insert table function, but problem is the active range changes all the time. Below is my current macro for this. Is there a way to perform the insert table function with changing ranges? Range("A1").Select Range(Selection...
  10. R

    Change the range of a macro automatically

    Dears, I want to change the range that the macro pulls automatically, as below: Sub Weekly() ' ' Weekly Macro ' ' Range("A2").Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection...
  11. B

    VBA: Excel has stopped working

    Hi All, have been running a very simple macro for the last few months which very simple pulls in a file from another location and pastes some data. It then Fetches another file and at this point it seems to cause excel to crash and the "excel has stopped working" error. This error has only...
  12. H

    Help With Mutli Sort

    I am trying to get VBA/Macro to mutisort a file. I was able to record a macro and get it done on the sample sheet, but it would be limited to the defined rows. I tried coding it like below, but I am now getting a named argument error. Columns("A:A").Select ActiveWorkbook.Worksheets("RAW...
  13. M

    Combine data on various sheets into one seperate sheet

    Afternoon, I have tried recording the below macro which looks to combine the data on 9 tabs into one tab. Problem I have is that the data on each of the 9 tabs is dynamic and may vary in number of rows. I believe I have identified the problem and have made the code bold and underlined. Any...
  14. L

    Macro Question

    Hello all! I'm struggling with a macro that I'm trying to create that will pull data into a Master workbook from a different workbook that is updated weekly. The problem I'm having is that the file I receive weekly is always named differently (updated for the week ending) and 7 of the 8 tabs...
  15. T

    VBA Help - Error when sinlge line is added.

    Good day.. Need help - Newbie in VBA coding. have below code: Columns("Z:Z").Select Selection.End(xlDown).Select ActiveCell.Offset(1, 0).Range("A1").Select ActiveCell.FormulaR1C1 = "=TODAY()" 'Selection.Copy Range("x3").Select Selection.End(xlDown).Select...
  16. V

    VBA Paste data in the next Blank cell

    Hi all, First of all thank you for viewing my thread. I am new to VBA, I use Excel everyday but recently I decided to learn about VBA ( just noticed VBA,SQL is the future). I am trying to tell my macro that it should paste the date copied in a different tab below the last cell with data. I...
  17. M

    Clean this Recorded Macro - Please Help?

    All - I know this Macro can be cleaned - can someone please help me? I also wanted to know if I can change the value of my H and AH columns to only auto fill based from the value of number rows on B. Thank you so much!!! Rows("2:2").Select Range(Selection, Selection.End(xlDown)).Select...
  18. A

    VBA code to copy Paste special value to another sheet based on cell value

    Hi All.. i have a database sheet get updates if its paid or partially paid or pending, i need to move the paid & partial to the paid Sheet based on the cell Value, i did my best from research and managed to have the below, however, what i have noticed few things 1- the pasted value does not...
  19. V

    Autofilter to stop if blank

    I have the code below and is all good if the autofilter find's the data, but is there a way to shop the code if autofilter is blank. In this case if autofilter don't find "Ten" Sheets("Sheet2").Select Range("b4").Select ActiveSheet.Range("$B$4:$AN$50000").AutoFilter Field:=35...
  20. earthworm

    Macro to dynamically copy new data and delete data from dynamic height

    I am trying to create dynamic macro if the data set does not contain the value Rizwan then copy paste it somewhere else , and then remove the data containing Rizwan from the source data . the height of data can vary and sequence is also not guranteed. how to make the macro dynamic i tried...

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