myrange

  1. M

    Set databodyrange of filtered table to include ALL cells

    I need to format ALL the cells in a filtered table (even the hidden ones). I have tried Sub test() Dim myRange As Range Set myRange = Sheets(1).ListObjects(1).DataBodyRange myRange.WrapText = True End Sub Can anyone please help?
  2. J

    Cannot copy to the last cell in the range

    I have written a code to loop though range of cells and copy certain data in a column. But everytime I run the code it just copies the last record and not all of them. The issue is somewhere in the destination line of code where it can't find the last unused cell. Any help will be very...
  3. M

    vba - vlookup help on another open workbook

    Hi Team, plz help, I am trying to apply vlookup up formula. but its throwing error on both the formula, plz assist , where I am doing wrong. Thanks. Sub vlookuptesting() Dim wbk As Workbook Set wbk = Workbooks.Open(ThisWorkbook.Worksheets("sheet1").Range("b5").Value) Dim ws As Worksheet Set...
  4. Dreamteam

    VBA - Add New Worksheets & Name (from a list of cells)

    Hi all, First post and pretty excited... I'm new to VBA and I'm really just trying to learn it correctly from the start (whatever that actually means). I have a pretty straightforward piece of code that I have written - which works - and that's great. However, I am wondering if this is...
  5. A

    when yo run this vba script, 0.1 does not get add properly , sometimes its just 0.0999999 but not 0.1 always

    Option Explicit Private Sub CommandButton1_Click() Dim mynumber1 As Double mynumber1 = mynumber1textbox.Text Dim myrange As Range Set myrange = ActiveCell 'currently does not support user input for a particular cell myrange = "Table of " & mynumber1 Dim mymoverate As Single mymoverate...
  6. M

    Macro for replacement

    Hello, I am using a macro to find & replace, but it work only when the cell has the value itself. I need the replace when he value contains in the cell, e.g. My knowledge in vba is almost null, please help me 1a = X A1...
  7. D

    Help to speed up UDF (if is possible)

    Hi all, its my first day at work and par of it is to run a formula based on a UDF, which search for a value within a cell text string based on a column list, this list is almost 25000 rows. Since its searching for this many words in almost 35000 text strings, it takes about 40 min, which is...
  8. B

    Looping issue

    Good evening, I am trying to loop through highlighted cells, to use the script below to anchor multiple cells within formulae: Sub ANCHOR() Dim MyRange As Range Dim MyCell As Range Set MyRange = Selection For Each MyCell In MyRange ActiveCell.Formula =...
  9. K

    looping through sheets based on range

    Hi I pretty new to VBA and have a problem I need some help solving. I have one sheet with a range (MyRange) containing the sheet names I would like to loop through. If the sheet name matches the name in MyRange I would like the macro to create a pivottable on a sheet that already is created and...
  10. D

    Incrémentation vb6.0

    hello fistly i work with excel and vb6.0 i have in excel sheet d3=1 d4=5 d5=10 I want increment myrange d3 to d5 with time enter in text1.text=1000ms but i found problem this code: Dim xl As New Excel.Application Dim xlw As Excel.Workbook Dim wsxlw As Excel.Worksheet Private Sub...
  11. S

    How to link cell reference to 1 sheet to another sheet ?

    i need help with macro i have made a code to create new sheet with help of cells reference ("E2:AG2") there are around 20 sheets which are going to generate by macro(when the sheets are created they must link to Abstract sheet) There is a issue with making sheets when the new sheet created it...
  12. T

    Refresh rowsource of a listbox

    I have a range (Myrange) with three columns, the first two (eg Name, Address) are filled and the third (eg Age) will be filled through a form. So I made a listbox with rowsource (Myrange) and the user will select his name and then an inputbox will ask for a numeric value. The value is inserted...
  13. tamrob23

    How to put comment in each column (VBA inserted)

    Good Afternoon, I have a VBA that needs a small tweek. The VBA that is capturing 4 columns and right now all the comments are going into one column. Basically what ever comments that are in columns A,B,C,D,E need to go into columns F,G,H,I,J. Thank you for taking time to read my thread and...
  14. A

    VBA hiding sheets except for one

    Hello All, I got this macro from this forum and it is working alright except for one little issue. When I run it, it hides all sheets (as it should) except for "Master" (again as it should), but it also leaves one last sheet visible. Why is that? Sub HideMultiSheets() Dim myRange As Range Dim...
  15. E

    Fill a sheet if sheet name = cell value in a range (VBA)

    Hello, I'm trying to make a VBA code that allow me to create new sheets with names corresponding to a values in a range, and then fill them. So, I have one sheet named "Team Statistics", with a table. With the first column ("A3:A14") I want to generate new sheets and rename them with each...
  16. P

    VBA- Adding Sheet Looping and Sheet exists

    I am relatively new to VBA. Getting Run time error 1004: That name already taken. Try a different one. Here is what I have, I just recently added the Loop, but I don't think I need it, and believe its something simple I am missing or don't understand. Quick Background- Looks at a separate...
  17. F

    How to resize a whole column?

    Excel 2010: Following code works if I pass a rectangular range but fails if I attempt to pass an entire column; I get runtime error 1004 (Application-defined or object-defined error) in the following code. Function GetRangeWithoutFirstNRows(inRange As Range, numRows As Integer) As Range Dim...
  18. D

    Trying to set up a sort using a defined range

    Hello, I'm trying to sort some data according to a column selected via a Message Box. The code I'm using is; Dim Answer As String Dim MyNote As String Dim RowCounter As Integer Dim MyRange As Range Range("A1").Select Selection.End(xlDown).Select RowCounter =...

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