myrow

  1. P

    Mimicking ROW() function using VBA

    Hi, I'm trying to broaden my horizons. Is there a way to mimic Excel's ROW() function in VBA? The following code is close:Function MYROW() MYROW = Selection.Row End FunctionBut if you have a range that spans more than two rows and hit Ctrl + Enter, it will only output the top row of the...
  2. G

    Copy Specific Columns Using VBA

    I am trying to copy a row in a table that includes some hidden date. I want to be able to past the row below creating another row in the table. When the columns are hidden I want them to also be copied and pasted below. How can I make sure that all my data in that row is copied including the...
  3. kelly mort

    VBA code to locate intersection of a row and a column

    I have these two variables: 1. MyRow 2. MyColumn I am identifying them with an input box entry So if myrow becomes A2 and mycolumn becomes F1 , then I am looking for a code to get that intersection (F2) for me. I will be placing some data at the intersection. But I don't know how to get the...
  4. G

    Vlookup Error

    Hi Everyone, Here i am trying with Vlookup for a dynamic range of values , but if i run the below code i would only get the value for that particular 'A4' and remaining all values would be in #N/A. And i am trying the lookup_Value and column_index_number also in a dynamic way(means...
  5. L

    selecting rows

    Hi The code below sometime works and some other does not. Specially when I change worksheets(1) to worksheets(2) but anyway now it does not work and I have 2 sheets in this workbook. Thank you so much. Sub myrow() Workbooks(1).Worksheets(1).Rows(2).Select End Sub
  6. M

    vba Run Time error '-2147221080(800401a8), Method 'Cells' of object'_Workdsheet' Failed

    HI i have below code and it gives "" Run Time error '-2147221080(800401a8), Method 'Cells' of object'_Workdsheet' Failed "" . please guide Private Sub CommandButton1_Click() Dim xlBook As Workbook Dim xlNewBook As Workbook Dim xlSheet As Worksheet Dim LastRow, myrow, lastColumn, rowPointer...
  7. V

    Use Contents of Cell in a Find

    Hi, I'm hung up on something that seems so simple! As part of a larger process, I want to find the row that contains a value in column A that corresponds with the information in another cell. I did some searching and found this code: Public Function GetRowNum(SheetName As String...
  8. M

    Appending To current file VBA

    Hi all, I have a vba set up already that works perfectly. Shown below (Any simplifications would be brilliant) Sub sbVBS_To_Delete_EntireRow() Rows(1).EntireRow.Delete ActiveSheet.Name = "Master" 'Updateby20150707 Dim Rng As Range Dim xInterval As Integer Dim xRows As Integer Dim...
  9. C

    Excel Dictionary - copy from sheet 1 to sheet 2

    Hi all, I have a client comments in sheet Client Comments that I would like to paste to sheet All Comments. Client ID's are in Column AV and comments in Column CE in both sheets. The code below takes 13 minutes and doesn't paste any comments so would appreciate any support. In Phase 1, I'm...
  10. J

    VBA Grouping Macro needing to be modified

    I found a macro that almost gets me what I need and was wondering if someone would help to modify. The macro I have is grouping column A and leaving the first row of each HCode ungrouped: What I need is to group Column A leaving the last (Total) row of each HCode ungrouped: Here's the...
  11. J

    VBA Grouping Macro needing to be modified

    I found a macro that almost gets me what I need and was wondering if someone would help to modify. The macro I have is grouping column A and leaving the first row of each HCode ungrouped. What I need is to group Column A leaving the last (Total) row of each HCode ungrouped: -- corrupted image...
  12. S

    Small tweaking to a script that breaks sheet into multiple sheets with the headers' row included in every sheet

    Code: Sub test() Dim lastRow As Long, myRow As Long, myBook As Workbook lastRow = ThisWorkbook.Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row For myRow = 2 To lastRow Step 900 Set myBook = Workbooks.Add ThisWorkbook.Sheets("Sheet1").Rows(myRow & ":" & myRow + 899).EntireRow.Copy...
  13. HunterN

    Search for Color Rows & put the Row # on it

    Hi, I have a worksheet that has header rows that are colored. There is data on the rows under each header and their cell color is white. I have this vba code that I have created that reads through the worksheet and determines the number of rows between each colored row, then puts the Row #...
  14. A

    Split Every N Rows From Worksheet Into New Worksheets with Header

    Hi, I have the codes which can split the data into new worksheet, but it is not considering the header while doing this. can anyone help me to solve this. Sub test() Dim lastRow As Long, myRow As Long, myBook As Workbook lastRow = ThisWorkbook.Sheets("Sheet1").Cells(Rows.Count...
  15. HunterN

    Find each row that has a Color (unknown color) and change the value of text in the cell

    Hi, I have the following module that will go through the used range in the worksheet and find each row where the Interior.color is NOT equal to vbWhite and add the following Row name to the value. Sub Colored_Cells() Dim LastRow As Long Dim myRow As Long Range("A1").Select...

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