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...
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...
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...
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"...
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...
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...
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...
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...
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...
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 =...
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 =...
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...
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 _...
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...
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...
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...
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 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.