rows.count.endxlup.row

  1. S

    Transfer of data range (multiple cells) from one sheet to another sheet automatically at the next blank row.

    First time posting sorry if I am not posting properly. I have used the code below previously to automatically input data from one cell to a master data sheet but now I need it to input multiple cells down the column. Sub data_input() ws_output = "SAMPLE FINAL" next_row =...
  2. B

    Percentage

    Can someone assist in dividing a cell by all cells in range. Something like this. I have lr as follows: Dim lr As Long: lr = Range("B" & Rows.Count).End(xlUp).Row range("D2:D" & lr) = "C2/sum("C2:C" & lr)" Thank You
  3. A

    Countif and Last row

    When using the first code, the code output the results required. however, when I want to make the code dynamic to find the last row, the output is (0) zero. Can someone explain what I'm doing wrong and offer a solution. Thank you kindly Dim i As Long LRow = Range("A" &...
  4. H

    Changing Date in Input Box

    I'm using the code below and today's date is pre-populated in the Input box. Is there a way to make it today() - 7 days? thanks! Sub DeleteFromDate() Application.ScreenUpdating = FalseApplication.DisplayAlerts = False Dim LR As Long LR = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row...
  5. J

    Runtime error on code 1072896658 (c00ce56e)

    If you put the following hyperlinks into cells I2:I10 and then run the code below it is failing on the line: Set details = JSONConvert.ParseJson(.responseText)("details") With the runtime error code in the title of this thread. Any ideas please? Thanks...
  6. J

    JSON not pulling data from web

    I have the following links in G2:G10 <colgroup><col></colgroup><tbody> https://greyhoundbet.racingpost.com/#card/race_id=1694843&r_date=2019-05-13&tab=form https://greyhoundbet.racingpost.com/#card/race_id=1694997&r_date=2019-05-13&tab=form...
  7. jim may

    Syntax help

    In A Double-Click Event Macro I'm Having Syntax issues in getting the 2nd code line to "take" Lr = Range("C" & Rows.Count).End(xlUp).Row If Not Intersect(Target, Range("N & Target.Row & ":P" & LR)) Is Nothing Then What's the proper syntax? TIA, Jim
  8. M

    Repairs / Records Removed: Sorting

    I have a file that consistently reports "Excel was able to open the file by repairing or removing the unreadable content". I have narrowed it down to a single macro which runs, and it seems to only cause "damage" when the file is opened on a different computer (on the same LAN) from which the...
  9. B

    Autofill Run Time Error

    Hi, I created a script to created three separate equations in columns, P, Q and R. I have it working up to autofilling down for P and Q, but am now getting a Run time 1004 error when it tries to auto fill down from R2 to wherever the bottom would be. Any suggestions would be helpful! Sub...
  10. L

    Conditional Formatting rules are cleared out after running the code

    Hi Experts - i have a problem with my code. I have a conditional formatting rules i set that highlights the cell if it has a value of FALSE or DUPLICATE. It works right after i set the rules however the rules get deleted after running below code. Do the rules get deleted by any of the codes...
  11. L

    Clearing of data works but if there's no data the code is deleting the headers

    Hi Experts - Good day! I have below code which is always the beginning of my process. I wan't to clear the table of any data for sheets Check and SRPT. The code is working as expected everytime there's data under the columns i'm trying to delete. However, if there's no data under the headers...
  12. gheyman

    Code not starting onthe correct row

    I need this to delete every row where there is not a "B" in column 9 (Column i) Starting in Row 5 down Sub DeleteIfNotB() 'Delete Rows that dont have a B in the Type column Dim LR As Long, j As Long LR = Range("C" & Rows.Count).End(xlUp).Row For j = LR To 1 Step -1 If Range("i" &...
  13. J

    Macro to copy rows from a sheet to another based on a criteria

    Hi there, I have limited programming knowledge but I manage to créate this code below. Rows from sheet1 are copied in sheet2 if column E is "YES". This Works but only If I run the Macro in sheet 1.Anybody knows why? 'Sub CopyRowToSheet2()...
  14. JTL9161

    Copying Formula to bottom of column based on last cell in another coulum

    I am trying to copy the formula in the active cell in column F to the bottom line of column F based on the last cell with data in column J. When I use the below code it copies it all the way down column F past the last cell in J. Am I forgetting something in this code? LastRowF = Range("F" &...
  15. B

    VBA error while sorting

    Hi, I have a (what I thought was) very simple line of code that is causing my macro to error if the macro is run from a different sheet to the sheet that the data is being worked on. I originally defined it within a block of With Sheets... code, but when it errored I defined the line itself but...
  16. D

    Referencing/selecting

    Hi guys I have a vba code set up but am not able to select a different sheet in the unsaved workbook. I get "subscript out of range error" The code is stuff ND . Press the Enter key to open the contact card." style="unicode-bidi: embed; direction: ltr; text-align: left; user-select: text...
  17. E

    How to use "AND" after THEN statement

    I have been using this below code. It basically copies the value from cell H5 everytime it changes to the first empty cell in column N. The problem is I need to copy H5 and I5 when H5 changes. I have tried adding AND like this: ...Then sh.Range("N" & Range("N" & Rows.Count).End(xlUp).Row +...
  18. S

    vlookup overwrite current value

    Hi All, I have 1 filtered data that already been processed(1st set). with my 2nd set code, it overwrites current(1st set) value. Is there any way to make my code only process visible cell. 1st set Sub LookMAL1() Dim x As String Dim LastRow As Long LastRow = Range("D" &...
  19. B

    Iterating through folders and files with paths > 260 characters

    Hi All, As per the title, I am having an issue with iterating through folders and files where the path exceeds the charater limits. Below is my code: Sub test() Dim FileSystem As Object Dim HostFolder As String HostFolder = Sheet1.Range("F16").Value If HostFolder = "" Then MsgBox "No...
  20. W

    Del row based on cell value

    I would like to search column "D" and whenever it finds the word "Gone" delete that row. Why does this not work? It runs but does nothing. Sub DeleteOnD() 'Application.ScreenUpdating = False For LR = Range("D" & Rows.Count).End(xlUp).Row To 2 Step -1 If Range("D" & LR).Value...

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