rngcell

  1. I

    Deleting columns if duplicate data found in a few

    Goal: If a duplicate value is found in a row, then delete the second the column associated with the duplicate value My problem: My code seems to work for the most part, except it only deletes the FIRST duplicate values that it finds, not all duplicate values. And if you run it again it seems to...
  2. H

    VBA Code Add Condition

    Hello Friends, I am using the this VBA Code to format dates which are greater than or equal to today. I require to add another condition i.e. if the adjacent cell (right one) is empty then only the code should format dates otherwise nothing should happen. Sub formatdates() Dim rngCell As...
  3. D

    Data in 2 worksheets in same workbook

    Help, please! My code is creating issues. The data with the new part in red is suppose to look for new IDs that match criteria and continue adding data from that code in worksheet ("MK_DB1") to the worksheet ("SPR"). It instead is adding iterations of the information and looping through all...
  4. D

    Pull results for unique values in 2 columns on separate worksheets

    I have this working if both columns are on the same worksheet, but I need it to work with 2 different worksheets in the same workbook. Help: Sub UniqueLooks() Dim rngCell As Range Dim r1 As Range Dim r2 As Range Set r1 = Worksheets("Res").Range("A1"...
  5. A

    For lRow = 353 To 2 Step -1 what does this mean

    I am using this bit of code in my macro I found to nearly work but could someone please tell me what this means For lRow = 353 To 2 Step -1 does it only go down to row 353? I want it to work on columns B & C only, thanks The full code is: Dim lRow As Integer Dim intCol As Long Dim rngCell...
  6. T

    Macro / VBA: Run macro on sheets defined in a list

    Hello everyone, Question regarding a macro I have, see pasted below. I have an excel file with approximately 100 sheets, and would like to automatically format rows and columns for specific sheets based on cell values in row 1 and column a. I have a tab named "List" which is named as...
  7. S

    How to auto populate a column with who edited the corresponding row and the time

    Hello all! Im having a hard time with my VBA. Im attempting to fill column M with who modified the corresponding row. I want the code to populate all the way down. This is my current code. Private Sub Worksheet_Change(ByVal Target As Excel.Range) Dim rngCell As Range If Intersect(Target...
  8. L

    Continuous running of Excel Macro

    Hi I am completely new to VBA so please bear with me if my problem is basic. I am trying to write a sub-procedure that will loop through each row in a certain column and compare to another sheet's criteria. if it contains "x", for example, then the value will be returned. However, when I...
  9. L

    Continuous running of Excel VBA

    Hi I am completely new to VBA so please bear with me if my problem is rudimentary. I am trying to write a function that will loop through each row in a certain column and compare to another sheet's criteria. if it contains "x", for example, then the value will be returned. However, when I...
  10. J

    sheet to sheet value comparison.

    Hi, I have code below to check if column F and D values are in other page, Column E,G,H should be in other page as well. So I have code below. This code is not working correctly it ignores the comparison from other page. Private Function rowLast() rowLast =...
  11. J

    vba nested if

    Hi, I would like to make code that if column B and A values are in the CheckList sheet, Column C,D,E values must be in CheckList sheet. However validating Column B and A works good, but C, D, E are not working correctly. Does anyone have any idea on this? Dim ValidateL As Long: ValidateL =...
  12. D

    Shift cells up for blank rows in multiple columns

    Hi, I am trying to delete and shift cells up for multiple columns but can't seem to get this to work. Any help is appreciated! Task: If columns F through K are blank, then delete and shift cells A through K up. (note: I'm trying to shift additional columns A through E) Here is the code I...
  13. J

    if value is not in range

    <code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier...
  14. J

    how to compare values from multiple columns from other sheet?

    Sub numbers() Dim rngCell As Range For Each rngCell In Sheets("Final").Range("F13:F" & rowLast) If WorksheetFunction.CountIf(Sheets("Filter").Range("A1:A" & rowLast), rngCell) <> 0 And _ Range("I" & rngCell.Row).Value <= 0 And _ Range("D" & rngCell.Row).Value < 50 Or _...
  15. L

    Debug Print output in msgbox

    How can I get the Debug.Print immediate window results to display in a msg box once all the values are found? Sub PlayerSessions() Dim rngCell As Range Dim ws As Worksheet Dim lngLstRow As Long Dim lngLstCol As Long Dim strSearch As String Dim txt As String strSearch = InputBox("Please...
  16. M

    Applt Conditional Formatting Result to cells

    I have a range of cells that contain a number of CF's and I need to remove these but retain the resulting formats. As the range can cover up to 14 columns and several thousand rows, is there a way of applying the formats at once rather than on a cell by cell basis? Currently I am using the...
  17. W

    Range.currentregion and offsetting a case to range count

    Hi everybody. I've been tinkering with a small code section using the Currentregion and trying to offset a case based on it What I was hoping for, was a currentregion.rows.count = x, lets say 10. Then for each of those 10 rows, it would apply the cases below on offset(0,12) and (0,13). I...
  18. M

    Highlight exact text in cell

    I know this question has been answered in a previous post; however, it appears that the VBA highlighted the text if any part of the word appeared (i.e. "blue" was highlighted if it was found as 'blue' or 'bluebird'). What I am trying to accomplish is to have a macro find and highlight only when...

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