rangef

  1. M

    VBA conditional formatting

    Hi Guys I need to use conditional formatting with VBA to change the colour of certain cells. I found the code below on this site, but need to format it so it changes the color of the cell rather than the number format. So if the word "Low" appeared in a cell, I'd want it to be red, for...
  2. 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" &...
  3. S

    Why is my IF statement not working?

    This is probably a simple one.. but I've tried many different ways and it won't work. The following calls the next function. If Range("E" & r).Value = 6 And Range("F" & r).Value = 6 Then This does not... If Range("E" & r).Value = 6 And Range("F" & r).Value = "_" Then This also does not...
  4. G

    copy active row cell to another

    Name error I’m trying to use VBA to test if cell (in the active row) [C] has no number in it or is blank, and also test if [F] has a number in it. If true then copy the condense of [F] to [M]. Everything seems to work until it get to the last line “copy “F” to M” I get a #NAME error...
  5. B

    Count Errors

    Evening Looking to Count errors in Column F. My attempt below. Sub countErrors() Dim lastRow As Long lastRow = Range("F" & Rows.Count).End(xlUp).Row Cells(1, 14) = Application.WorksheetFunction.Count. _ Range("F2:F" & lastRow).SpecialCells(xlCellTypeFormulas, xlErrors) End Sub
  6. A

    Sorting column data ascending

    Hi everyone I would like to sort the column F in ascending with row one as header. The spreadsheet have 13 columns up to column M, I have done the code below but it needs debug: Range("A2:M", Range("F" & Rows.Count).End(xlUp)).Sort _ Key1:=Range("F2"), Order1:=xlAscending Please could...
  7. 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...
  8. S

    VBA SUM with variable amount of cells

    Hi all, I want to put a sum formula in a cell but I want my formula to depend on the value of another cell. So for instance: A regular sum formula with relative reference looks like this: ActiveCell.FormulaR1C1 = "=SUM(R[-2]C:R[-1]C)" However, I want to change the -2 value that I colored...

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