firstrow

  1. G

    Vba Delete row if data from another cell exists

    Hi, I have the below code however I need to change it to reference cells C4-C4 and delete the row, if Column H contains the data typed in cells C4-C7. Thank you for any help . Sub Loop_Example() Dim Firstrow As Long Dim Lastrow As Long Dim Lrow As Long Dim CalcMode As Long...
  2. K

    VBA Get first row and column of the first data in Pivot Table

    Hi, I'm new to Excel VBA. I have been struggling to get the first row and column of my Pivot Table. Please assist on this subject. Thank you! Private Sub firstCOLROW_Click() Dim pt As PivotTable Dim firstRow As Long, firstCol As Long Set pt = ThisWorkbook.Sheets("Nevada Chart").PivotTables(1)...
  3. J

    Error while using FindNext function

    I am trying to find the multiple row numbers in which a particular value is found inside. In the code shown below, the red coloured line shows an error Sub LoopThroughSheets() Dim findRng As Range Dim firstRow As Long Dim row As Long Dim allFinds As String Dim numberOfRowsWithSameMKB As...
  4. J

    object variable not set error

    Sub LoopThroughSheets() Dim findRng As Range Dim firstRow As Long Dim nextRow As Variant Dim allFinds As String Dim numberOfRowsWithSameMKB As Integer Workbooks(SYSDatei).Activate For j = 0 To SizeOfMKB_array - 1 For Each ws In Workbooks(SYSDatei).Worksheets wsName =...
  5. J

    Error while using FindNext function

    I am using FindNext function to get the row information of cell containing a variable called 'MKB' . my code is given below : Sub LoopThroughSheets(MKB As Variant) Dim findRng As Range Dim firstRow As Long Dim allFinds As String Workbooks(SYSDatei).Activate For j = 0 To...
  6. C

    loop through riow & columns & match each cell in row

    I have data wtih 21 rows & 6 columns. Wherein I need to compare a1 with a2 to f2 similarly ,b1,c1,d1,e1 & f1 with a2 to f2 and then increment row by 1 and continue the same process till end. If the result matches then highlight the previous row cell...
  7. ExcelNooberino

    [VBA] SumIf Errors

    Hello everyone, I keep trying to achieve a formula that allows me to sum some cells in a different sheet than the one I wanted posted so I've developed a code such as this one below: I keep getting syntax errors and so on no matter how I switch it up, I need some help! :(
  8. masud8956

    VBA code not running in a different pc

    Hi everyone! I am trying to import a large array of data from multiple files located in a folder named "Aircrew_Flying_Hour" in D:\ using VBA. The code runs alright in my pc. But it does not run in other pc. I need to be able to run it from a different pc. Do I need any modification of the...
  9. Trevor3007

    merge 2 codes into 1

    good evening, Hi I use this code:- Private Sub Worksheet_Change(ByVal Target As Range) ActiveSheet.UsedRange.Borders.Weight = xlThick Dim FirstRow As Long, LastRow As Long, i As Long Application.EnableEvents = False With ActiveSheet.UsedRange FirstRow = .Row...
  10. masud8956

    Hyperlinking data in other sheets from one sheet where data is imported by Macro

    Hi, In sheet 1 of my worksheet, I have imported data from multiple worksheets using the following VBA provided by a valued Board Regular of this forum (@mumps): Sub Test() Application.ScreenUpdating = False Application.Calculation = xlCalculationManual...
  11. N

    Excel VBA copy shapes and paste in new worksheet with blanks between each shape

    Hello, I have code that will make spaces between the shapes but I cant seem to get this code to select range on one page and paste it on another page with the blanks between the shapes. The shapes have no names. code: Sub InsertBlankRows() Dim Rng As Range Dim WorkRng As Range Dim FirstRow...
  12. H

    Have the Array reference relatively, so I can start at 1 when referencing

    I am trying to learn to build a 2d array, by finding the data and then populating the value of it. In the below example, I have a used range that starts in Cells(7,7) and continues to Cells(11,8). Very small data set I am using for learning. When I get all the way to the bottom and use the...
  13. H

    Finding and Replacing code

    The below code works well, and I do not necessarily need anything, but again, I've used the "Select" option in VBA, and was wondering how I could possibly remove the Select piece of this code. Like I said, it works fine and I have no problem with it, but if you have any suggestions on replacing...
  14. D

    HOW to Use VBA to Doublespace with tables

    Here is the code I'm using to double space but for some reason it doens't work when my data is in a table. Let me add that this data is coming from a microsoft query. Sub InsertBlankRows() Dim Rng As Range Dim WorkRng As Range Dim FirstRow As Integer, xRows As Integer, xCols As Integer On...
  15. S

    When to use Quotes

    When I use the following, I place the formula into the Spreadsheet and get the resulting row number. Range(emailColumn & FirstRow & ":" & emailColumn & LastRow).Formula = "=MATCH(B2,'RosterFileName'!FullName,1)+3" When I try this function in VBA I get different errors; syntax, compile error...
  16. Mark F

    VBA to sort rows selected by column value

    The code below, kindly provided / supported by others in the group identifies / selects a range of rows where the contents in Column C match It will then sort those rows using the sort criteria included What I would like to be able to do is to somehow modify the code so that each subsequent...
  17. D

    VBA code no working on MAC (working fine in windows) + two other logic

    Hello Experts, I have below code which works just fine in creating TXT file of some columns in windows version. But in Mac its not updating the text file at all. Sub ExportTXT() Dim FirstRow As Long Dim Lastrow As Long Dim r As Long Dim Data As Variant Open...
  18. RobbieC

    Outputting a sheet to .csv with special formatting... (vba)

    Hi there, I have a sheet which I need to output to .csv (or more specifically .txt) I've posted the workbook to my webserver: http://www.bluecustard.co.uk/Book1.xlsm Sheet 1 (DATA_FULL) holds the data which I need to export. I can do this using: Sub ExportRange() Dim FirstCol As Integer Dim...
  19. S

    Creating dynamic range

    Hello, someone can recognize me with my questions, someone not. At start want to wish you good weekend. Heres my question: How to create dynamic range using variables? Macro should copy 20 rows from bottom to another sheet, but there are some complications: Below, on the image we see that...

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