rangea1.select

  1. 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...
  2. D

    Is it possible to be able to tidy and make my code quicker?

    Hi, I have a list box with the 52 weeks of the year in listed as WK 1, WK 2 and so on up to WK 52. So when a week is selected from the listbox all the data is copied from that week sheet on to my current weeks data sheet. Here is part of my code. Its is all the same apart from the week...
  3. D

    [VBA] How to close CSV file after importing data

    Hi, I have poorly designed a VBA macro that opens/exports .csv data to an excel... works fine but when I export - say 10 csv, I'm left with 10 csv opened... I am trying to extend the coding so that the VBA macro also closes the csv files - thank you Sub Macro1() ' ' Macro1 Macro ' ' Set...
  4. M

    VBA combo box - navigate to multiple different sheets based on drop down selection

    Hello, I have 7 different sheets that I want the combo drop down box to open based on the number in cell C50 in a separate control sheet. I have the following code written although keep getting an error "Compile error: Block If without End If" any help is greatly appreciated! Sub...
  5. countryfan_nt

    Going sheet 2 sheet of workbook; but skipping one sheet.

    Hello friends, hope all is well! The code here hops from 1 sheet to the other, and when it reaches the last sheet, it goes back to the first sheet. Can you please help me with the code. I want the code skipping going to: Sheets3. Thank you so much in advance! Sub MoveNext() On Error...
  6. B

    Help with a macro please-runs fine on one pc but not another

    Hi Everyone, I am running a macro that in a nutshell Opens Internet Explorer, does Select All and Copy, and then pastes to cell A1 in a worksheet. It works flawlessly on one PC but hangs up on the Orange highlighted line below on another PC. Both PC's are running Windows 10 with exactly the...
  7. 3

    VBA duplicates and range

    Hi Please help with the following Sub append_data() ' ' append_data Macro ' ' Rows("1:1").Select Selection.Delete Shift:=xlUp Selection.CurrentRegion.Select Selection.Copy Workbooks.Open Filename:= _ "C:\Users\abdullah.alzadjali\Documents\Oman VBA\VBA\Orders.xlsx"...
  8. L

    Print Macro to .pdf...Multiple Pages to One .pdf

    I have a print macro designed to copy/paste, then print. It repeats these steps over and over as it moves row by row down the document. It works great. However, after printing paper copies I'd love to be able to re-do the print macro while printing the multiple pages to just one .pdf file. When...
  9. S

    Importing data via VBA but not to overwite data

    Hi I am trying to import data but to insert rather than paste. The code I have is pasting the data in to columns A-E but the existing data in columns G-I is moved down rows. The code is Cells.Select Selection.Copy Sheets("No Answer").Select Range("A1").Select ActiveSheet.Paste...
  10. T

    Find name in column and copy to relevant worksheet

    Hi Guys, I have a list of data with a persons name in column N. For each person i have created a tab which is identical to their name in column N. Is there a way to filter by that person and copy all of the data to the relevant named tab as values. At the moment i am doing the below but...
  11. 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...
  12. H

    adjusting autofill range by referring to last row/column containing data in another sheet

    Im trying to find an addition to the code blow, which adjusts the 'Selection.AutoFill Destination:=Range("A1:JS5338")' options on sheets 2 and 3 is there a way to identify the last column and last row containing data in "sheet 1" and use this range automatically as the autofill option on sheets...
  13. S

    Applying a formula down a column, only as far as needed

    Hi. My table length will vary week to week. I want to put data in column A, only if there is data on the same row in column F. My macro at the moment is... Range("A1").Select ActiveCell.FormulaR1C1 = _ "=IF(iserror(VLOOKUP(RC[5],Sheet1!C,1,FALSE)),""yes"",""no"")"...
  14. syndee

    Anyway to stop Excel from flickering when opening a macro

    Have workbook that does everything I want but flickers when I open it. I have Screen updating. false but still flickers. Maybe it's normal, just thought I'd ask. Private Sub Workbook_Open() Application.ScreenUpdating = False Workbooks.Open (ThisWorkbook.Path & "\Accrual Report.csv")...
  15. L

    Macro to find next blank cell in a column

    I need to include a line that will find the next blank cell in column A and then run the macro. Here is the macro as it is now: Sheets("Sheet2").Select Range("A1").Select ActiveCell.FormulaR1C1 = "=NOW()" Range("A1").Select Selection.Copy Selection.PasteSpecial...
  16. ryan0521

    How can I simplify this one?

    'one If mwkb.Sheets("Cover Sheet").Range("ab11").Value = 1 Then Set Wkb = Workbooks.Open(PATH1) mwkb.Sheets("1").Cells.ClearContents Wkb.ActiveSheet.Cells.Copy mwkb.Activate Sheets("1").Select Range("A1").Select ActiveSheet.Paste...
  17. zakasnak

    VBA error 1004 Formula is missing a range or a defined name

    Good Morning! I have vba that purges data for public posting, then saves each tab (named range) as a separate pdf to combine & post to the web. I'm getting a Run-time error '1004' "This formula is missing a range or a defined name" on Named Range(Table_7), on Tab "Table 7", when trying to save...
  18. M

    VBA - select the row if it contains certain words

    Hi All. I am trying to select the rows that contains the text "#N/A" on column N. How do I do that? My data are on columns B through columns N. Sub CutNA() Dim FirstNA As Long, LastNA As Long FirstNA = Columns("N").Find("#N/A", , xlValues, , xlRows, xlPrevious, , , False).Row + 1...
  19. S

    Method 'Range' of object '_Global'' failed - Query

    Hi All, I'm hoping someone may be able to point me in the right direction with this. I have some code which filters data and subsequently creates individual spreadsheets using the filtered data. I am using a range to help inform my file name when I save the newly created spreadsheet, but I...
  20. A

    Removing duplicates

    Hi Guys, Very first time using VBA - complete Newbie. I'm using the below code to basically organise and copy data into a monthly master data sheet. I would want to build in the control to prevent duplicate values to be posted in the master data with an error message. Appreciate your help Sub...

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