ranged

  1. L

    adding text to two different cells and highlighting row

    Hello, Can someone please help me with this? I am using a Dim statement in VBA but would like to expand my text to the next column over. Here's what I have so far: Sub CommercialMarketPlace() ActiveSheet.Select Dim a As Long For a = 1 To Cells(Rows.Count, "S").End(xlUp).Row If Range("S" &...
  2. M

    Trying to modify code to run when user leaves a sheet

    Hi all, Apologies, I've been doing some reading and little out of my depth. I'm trying to convert the below code to work with worksheet_deactivate() command (when leaving a worksheet "Rebate Conditions"), however not having any luck. It works as a macro in a button on the sheet, just not when...
  3. W

    Run code depending on row number

    Hi All, I have some code I want to run which compares the last found value in one column with another. Depending on the row number, I want to do different things. Code: lRowWS1 = sht1.Cells.Find("*", searchorder:=xlByRows, searchdirection:=xlPrevious).Row lRow1 = sht1.Cells(sht1.Rows.Count...
  4. T

    How to delete entire.column between a Range.

    Hello, what I want to do is: i have a ranged name" Adjusted" and ranged name " Start" which is located in A1. i want to delete entire columns between range "Start" and "Adjusted". wherever the range " Adjusted" is located. btw, before this code, need to find the range "Adjusted" and delete all...
  5. 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...
  6. A

    VBA Clearing Contents of Last 20 Rows

    Hello! I need to create a variable length report. I am able to get the code to work but I need to add 20 'blank' rows at the end of the data set for additional write in data. Now I can copy the last row 20 times but can't get how to clear those rows as I need the rows to have the borders. If...
  7. W

    Help me make this dynamic

    Guys i have a piece of code (noted with the *) that repeats itself over and over for different columns. Range("D3").Select ActiveCell.FormulaR1C1 = "=Year(NOW())" If Cells(Rows.Count, "A").End(xlUp).Row > 3 Then *LR =...
  8. M

    Help with Graphs

    Hi, I need a little help with Graphs. If anyone can help would be highly appreciated. I have this following scenario, the code I have written to implement it is given as under however, it does not work in some scenario. The following is a directional graph (Note that the direction is...
  9. G

    VBA run-time error 1004

    I am hoping someone here can help. I have written a piece of code in a VBA Module but when I run it, I get a the following error Run-time error '1004': Method 'Range' of object '_Global' failed The intention of the code is to look at a series of results and highlight the numbers which are...
  10. V

    IF Function

    I'm trying to create a ranged condition and my formula doesn't seem to work. Condition: <tbody> </tbody> 0 - 5 days 1 6 - 12 days 2 13 - 20 days 3 > 20 days 4 formula: if(a1=<5, 1, ""), if(and(a1>=6, a1<=12, 2,""), if(and(a1=>13, a1=<20), 3, ""), if(a1>20, 4,"")
  11. A

    VBA IF AND for inserting/deleting rows

    Hi, I have two sheets with a list of data on each, both have ID codes for each row, but they don't always match: Sheet 1 should have all the codes but it also duplicates some, and the duplicates must be retained: Eg 1 2 2 2 3 3 4 5 6 7 7 8 9 [...] Sheet 2 doesn't have all the codes: 1 2 3 5 7...

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