Hello: I have part of a macro that needs to clean up cells and replace the bad data with the good data. I'm using a loop nested if else, but is there a more efficient way? This looks cumbersome. Any help would be appreciated . Thank you!
Sub cleandata()
Dim i As Long
Dim DataValue...
I have a userform with three textboxes that collect a search term: search1, search 2, search3. The search value runs through a function generating a list which populates listboxes: listbox1, listbox2, listbox3. If an item in the listbox is doubleclicked then it runs an Instr function selecting...
I can't seem to get the syntax right on my nested OR/ANDs section so I keep getting an error - please help! I'm sure there is a better way to do this than having all the InStr() OR InStr() but I'm not comfortable in VBA at all so I dont' know very much
<code style="margin: 0px; padding: 0px...
Hello everyone! I am a pretty beginner vba user and having some trouble getting a loop to work. I have a pretty extensive formatting code here, which works perfectly on a single worksheet. When I then try to have it loop through every single worksheet in the workbook except for the "Original"...
Hoping for a more streamlined piece of code. This basically compares multiple columns in a row to see if that information is in a string (row) on another sheet.
It works great but its bulky and slow as it is repeating itself over and over again. works great for small files but when i run it...
I've got a variable called strShtName, declared as a string.
It's set once at the top of a loop.
Way down in the loop, a function is called
If TblShapeExists(strShtName) Is Nothing Then
Half way through the function, the value of strShtName is changed on the line in red below. There's a...
Get a debug in the clear property
Sub RCInclude2()
Dim Cl As Range
For Each Cl In Range("J2", Range("J" & Rows.Count).End(xlUp))
If InStr(1, Cl.Value, "Include", 1) > 0 Then
Cl.Offset(, -2).Value.Clear
end if
end sub
Hi All,
I was using below code to generate .mo format files. Now I need to generate .Xml files using below code.
So I changed the .Mo extension to .xml in below code. But its not working. When I am opening that xml in internet explorer it opening as blank.
Can anybody suggest me what and where...
Hi, I am trying to determine the column width but not sure how. What I wold like to do is:
If it is smaller than a specific number then auto fit that column
If the width is bigger than that number then set the column width to that number
Can someone help please.
Here is What I have so far...
Hello,
I have a document (shared) which we use as a calendar and to keep track of people and where they are. It has all 365 day on it and with over 100 people.
I would like a vba to search the document and change the cell colour based on the value. For example: Red if someone is away on...
Dears,
Is it possible to speed-up my code?
Sub test()
Dim fn As String, txt As String, delim As String, a() As String
Dim i As Long, ii As Long, iii As Long, n As Long, x, y
fn = "C:\Users\bruno\Desktop\Airports.txt" ' ?Change here (File Path)
delim = "|"...
Hi
I hope you can help me. The following macro works but it also deletes columms that partly contains the string its searching for.
'Sub Remove_columns()
' Dim wS As Worksheet
' For Each wS In ThisWorkbook.Worksheets
' With wS
' For i = .Columns.Count To 1 Step -1
'...
Hi, I'm trying to write a code to define an alternative VLOOKUP that works with closed files and in a dynamic way.
My problem is, although the code be very simples as you will see, I'm receiving a error message that I not able to solve.
Could someone help me?
--------------------------...
Hey guys my code below works only partially.. basically whenever it wants.
For the first part of the code where it looks for dilutions (ie x5 x10 x20 x2.5) it doesn't recognize decimals.. Can the string value be changes to recognize that?
For the C1 part of the code: Seems to never c1 if one...
I have a userform that sends a copy of the workbook via email. The primary goal is to send the form back to me (or my counterpart) but it could be useful to send within the company as well. I want to ensure that any email addresses entered have a company domain. I'm not worried about actually...
HiFolks,
I'm trying to create a userform that will checkto see if information related to the current row had already been recorded to a different worksheet (Worksheet1 is the active one, worksheet3 holds the information),and pre-populate the checkmarks on a multi-select option listbox with...
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.