rangea

  1. N

    Copy only part of last row that has data

    I have this code: Range("A" & Rows.Count).End(xlUp).EntireRow.Copy Range("A" & Rows.Count).End(xlUp).Offset(1).EntireRow.PasteSpecial It copies the entire last row that contains data and pastes it one row below. I only want it to copy part of the row, columns A to I to be exact. How do I edit...
  2. P

    VBA Cascading Listboxes 4 columns unique values only

    All, I'm looking for some help... I've followed this tutorial: the third list https://vbaf1.com/programming/cascading-dropdowns-useform/ ANd have expanded it to allow for 4 listboxes (from 3) - however the slight issue I'm having is that the third listbox is displaying duplicates and I'm not...
  3. T

    Matching value in Range("A5") against a list of items

    Hello, I have a script with an IF Range("A" & r) value is also in a lookup list AND Range("I" & r) THEN do something. I know I can do a bunch of ORs but that doesn't seem particularly neat. IF Range("A" & r) is in Lookup list named Type AND Range("I" & r) IS NULL Then DoSomething. Any ideas...
  4. J

    Popup timer

    Hi, how can i make the codes below popup display reminder every 2 hour message. Sub popup()Dim lstRow As Long Dim i As Long Dim msg As String msg = "The following items are almost due" & vbCrLf & vbCrLf lstRow = Range("A" & Rows.Count).End(xlUp).Row For i = 2 To lstRow If Range("A" & i) -...
  5. M

    How to create a range from a cell value and repeat time in another cell ?

    Right now I have a data A1:A100 each cell is 500 So my range called RangeA is A1:A100 Can I do without need to have this list in this 100 rows Now I key in, B1=500, C1=100 How can I create RangeA based on these two cell values ?
  6. S

    Cell Contain Certain Text Delete

    My "A" cell text contains "doggy" "doga" etc and i wish i can delete the rows. But the below code can only delete the row with the exact name. Pls help. Sub Macro1() LR = Range("A" & Rows.Count).End(xlUp).Row For i = 1 To LR If Range("A" & i) = "dog" Then Range("A" &...
  7. Trevor3007

    change colour based on wildcard?

    evening, i have the code below (it runs within more code, I just extracted & added the 'end sub') Works great in the workbook that it was originally designed for. Private Sub Worksheet_Change(ByVal Target As Range) Application.ScreenUpdating = False Dim rng As Range...
  8. H

    Fill Cells With Colors When A Value Changes

    Hi All, I am using the below code to create partition / applying borders in range A4:L4 down till the last non empty cell whenever a value changes in Column B. Sub Test() Dim LastRow As Long LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row...
  9. DataBlake

    Using Range & Rowscount

    Dim lastRow As Long destrow = Sheets("Master Wheel").Range("A" & Rows.Count).End(xlUp).Row Columns("T:T").Select Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove Range("T2").Select ActiveCell.FormulaR1C1 = _ "=IF(ISERROR(VLOOKUP(RC[-19],'Master...
  10. DataBlake

    VBA Vlookup a file

    I know this has probably been answered a bajillion times but i cant find what i'm looking for on google. I want to vlookup another workbook (only contains 1 sheet) so i have this Range("R2").Select ActiveCell.FormulaR1C1 = _ "=VLOOKUP(RC[-17],[MHTqty.xlsx]Item!R1:R1048576,3,FALSE)"...
  11. D

    loop replacing certain text in multiple columns

    For Count = Range("a" & Rows.Count).End(xlUp).Row To 1 Step -1 If Range("a" & Count) = "STIM" And Range("b" & Count) = "U$" And Range("c" & Count) = "053" Then Range("a" & Count).Value = "STIH" And Range("b" & Count).Value = "U$" And Range("c" & Count).Value = "981" Next think it said...
  12. S

    macro to copy cell without moving

    Hi I'm stuck on how to have a macro copy and paste something without leaving the cell that the cursor is in after the sheet opens and the cursor lands on the next empty cell in a, I want to copy what is in H above that row to Z1 but i want to stay in that A cell and add input. I don't know...
  13. H

    Macro to delete rows where text starts with a ~

    I have the following sample data below I have written code to delete the rows where the data contains a ~, but the code does not delete any rows where the txt contains a ~ Book1A1M_BR1.xlsm2~$M_BR1.xlsm3M_BR2.xlsm4~$M_BR2.xlsmWorkspace Sub Del_Unwanted() Sheets(1).Select Dim LR As Long...
  14. T

    Lock Sheet Row Based on Value in Column 8

    Hi All I currently have the below code as a worksheet change, however i now need it to run when a button is pressed. Can someone please help me convert it to work like that, ive tired but i keep getting an object error. Private Sub Worksheet_Change(ByVal Target As Range) Sheet17.Unprotect...
  15. P

    Delete Row if Cell value Starts with...

    Gang, LR returns 0 Value... sure it's an easy fix. What am I doing wrong? Sub freshList2()With Sheets("sL") Dim LR As Long LR = Range("A" & .Rows.Count).End(xlUp).Row For i = 1 To LR Step -1 If Left(Range("A" & i).Value, 1) <> "1*" Then .Rows(i).EntireRow.Delete...
  16. A

    To select a range between two cells containing specified text

    Hi All Thank you for your Supporting I have small problem; I copy data between the “Standardization Code: “in single row. The “Standardization Code” part of the sentence I Get below code but thin code not moving next Sub SelectBetween() Dim findrow As Long, findrow2 As Long 'On Error...
  17. K

    filtering inventory list to separate supplier order forms but code crashes if not all suppliers included

    I have a master price list for ordering stock and the following code works as long as I'm always ordering from all suppliers. I filter out the all items which are being ordered when quantity required column is greater than zero (field 11 > 0) Then I filter by supplier column (field 2) and copy...
  18. C

    If cell is equals value copy another cell

    I hope you can help me! I am struggling to get this function to work. I have a spreadsheet with X's on, as if they were ticks. Basically I need to copy cell A if F = x. Dim lRow As Long 'Determine the last Row. lRow = shTarget.Cells.Find("*", LookIn:=xlValues...
  19. A

    Copy and Paste by 3 ComboBoxes

    Good Day, My worksheet has datas all the way down with 9 columns. (a:i) Cloumn A= Year Cloumn B= Area Cloumn C= Date I've placed 3 comboboxes with related those columns given above. Is it possible to copy and paste the datas from one sheet to another sheet for those comboboxes related datas...
  20. kelly mort

    Add criterion for page break to page header

    Hello world, I am stacked here and need some help: I used the below code to set my page break. I am looking for a way to add the criterion to its pages'header. So I want to use the first two rows as a common header that runs across all the pages. That I can do, but my challenge now is to get...

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