rng2

  1. 5

    Count only visible data after filtering

    ​Hi, what do I need to add to the below code to only count the visible data after filtering. I assume it is possibly .SpecialCells(xlCellTypeVisible) or similar after With Worksheet("calculations"), but I can't figure it out. Help appreciated. Sub Count_only_visible_data()With ActiveSheet...
  2. S

    check for missing records and paste to sheet

    hi all, I have the following code: For iCounter = 9 To iLast Set rng1 = ws.Range("G9:G5000").Find(ws2.Range("G" & iCounter).Value) If rng1 Is Nothing Then ws2.Range("A" & iCounter & ":" & "K" & iCounter).Copy ws.Range("A" & ws.Range("A" &...
  3. A

    VBA - Do stuff based on a value in a merged cell

    Hi Thanks for visiting my post. I have a task to insert a row based on the value of a cell. However some cells are merged cells, some unmerged. I have tried code below. But it does not work with "type mismatch" error:- I do not know the exact location of the merged cell. Any expert knows how to...
  4. T

    Type Mismatch Using SumProduct

    Hello, Let's say rng1 is some range like A1:A10, and rng2 is some range like B1:B10. I am trying to do the Application.WorksheetFunction.Sumproduct and it is giving me a type mismatch. I have: Application.WorksheetFunction.SumProduct(--(rng1 > 0), rng1, rng2) I only want to sumproduct...
  5. M

    Problem with autofill function?

    Morning all, Could you please help me out with my code - I'm simply trying to fill down from the cell with a formula (Rng2 in my code) but I'm getting error upon error. Rng2.AutoFill Destination:=Range("E2:E14"), Type:=xlFillDefault - gives me an error; as does Rng2.Select...
  6. S

    Excel VBA Object Required Error

    Hello All, I am very new to VBA and just beginning to learn. I have a code here to match all the cells of the "M" column in Sheet1 and Sheet3, and delete all the rows from Sheet1 that contain any value from Sheet3's "M" column. If I go through it using F8, I do not get any error but when I...
  7. K

    Mixed Bag - VBA index/match, ComboBox Text derived from Named List based on cell formula, etc...

    Afternoon everyone, I'm really struggling to figure out what is going on now. I've tried to create an excel document that will act as a job tracker throughout various phases of construction. The initial worksheet layout is based on shapes used as tabs, which determine which columns are...
  8. Ramballah

    Autoincrement help

    Hey so im working on a script where im copying charts everytime and stuff but for every loop i want to autoincrement aka show which loop it is. in my code below the copy stuff works fine but i just need in the line rng4.Value = "Chart " & (d + i) something changed to make it work but idk how...
  9. S

    Workbook_BeforeClose event

    Hi, I am looking for some help in modifying the below code. Present Situation: Below code will not allow the user to close the workbook unless Rng1 is filled out. Requirement: The below code should be modified in a way that if all cells in the range are blank, user can close the workbook...
  10. T

    Application Intersect Issue

    I have the following code Written to open my calendar whenever someone clicks on the targeted cells. However, I get a Method Range of Object worksheet failed Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim rng1 As Range, rng2 As Range, rng3 As Range Set rng1 =...
  11. R

    Using If, Then, Else in a UDF

    Hello and Happy New Year I would like to change this formula to a UDF or Sub if possible: IF($D16=0,"0",IF(INDEX(STDRATE,MATCH($C16,Resource_Code_LIST,0))>$AV16, INDEX(STDRATE,MATCH($C16,Resource_Code_LIST,0)),IF(OR($C16=0,INDEX( TOTAL_WAGES,MATCH($C16,Resource_Code_LIST,0),MATCH(...
  12. D

    VBA Filtered LastRow to specific row where the header is located

    Hi, I am having a problem where I am trying to add specific text to a filtered column in the visible cells only but the code below adds the text below the used range. I would like to only add the text to the filtered visible cells not including the header, can some one help with this please...
  13. D

    VBA help with cell value

    Hi, I am trying to get the data from one cell value and add it to another cell value but the result i keep getting is just one cell value being added to all the other cells values, can someone help please. Dim Rng1 As Range, i As Range, Rng2 As Range, x As Range, a As Range, b As Range...

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