cnt

  1. S

    vba to find all instances of word, and replace adjacent column with formula

    Hello, I have been at this all morning and cannot get it down. I am trying to search column "d" for "wire" or "roll" and insert a formula in column B of each instances row. The formula is counting all instances from another tab. For some reason, my larger macro (bottom code) makes the...
  2. S

    VBA code help

    Lads, This post relates to my previous one as no one is replying :) https://www.mrexcel.com/forum/excel-questions/1054040-vba-runtime-error.html I need to amend code so row is added. At the moment code only removes row. Million thanks. Sub test() Dim cnt, rw As Integer Dim val As Variant...
  3. S

    VBA runtime error

    Lads, I have issue with my manually entered data on excel spreadsheet misaligning when data is refreshed from MS query e.g row is added or removed by query. I have came across this: https://www.techsupportforum.com/forums/f57/mis-aligned-data-on-data-refresh-565373.html I have tried to follow...
  4. T

    EXCEL VBA to Compare WS and insert missing data.

    I have the following code to compare two worksheets and if any of the account data is missing insert a row to add the missing data. When I ran the Macro it worked as expected accept it did the insert piece for every number after the first in the list that was not present on the compared master...
  5. Victtor

    TOC sorted alphabetically

    I have code to create a Table of Contents based on worksheets. Can someone please add code to have this list sorted alphabetically? Thanks in advance Sub tocmaker() Dim wsh As Worksheet Dim cnt As Long Dim doit As String If Application.CountA(ActiveSheet.Range("A:A")) > 0 Then doit =...
  6. B

    VBA Ignore Shapes that are Drop Downs

    I am trying to count the number of shapes in a given range which has worked fine so far. The code throws an error if I run the code after activating a drop down menu in the sheet. Dropping down the menu causes the sheet to "add" a shape called "Drop Down 13". My code does not like that and...
  7. G

    VBA attempt in baby steps

    Hi everyone, I am attempting to build a VBA loop that'll go through all populated data in each cell with columns "A" and "B" and in doing so move each value in these cells from A2:B2 to E2:F2, & then loop to the next row and move A3:B3 to E3:F3.. etc etc I am not any good with VBA loops and...
  8. S

    How to fill a multiselect listbox from a cell

    Hi I have found this code on the net Dim arrItems() Dim cnt As Long Dim I As Long For I = 0 To ListGateWay.ListCount - 1 If ListGateWay.Selected(I) Then ReDim Preserve arrItems(cnt) arrItems(cnt) = ListGateWay.List(I) cnt = cnt + 1 End...
  9. T

    How to make code work in Mac

    Hi! I have got some code that is working beautifully on PC but not when the file is used on Mac. I'm hoping there is a way to get the code to work on both PC and MAC as we have two people needing to use the file, one with PC and one with a MAC. Any suggestions hugely appreciated! The code is...
  10. Z

    Any tips on how to modify this VBA to select all sheets in a workbook?

    This is some VBA from another thread here that would be very helpful to me if it were able to select all sheets in a workbook. I didnt want to hijack the other thread with this question so I posted a new thread. Any help would be appreciated. Private Sub test() Dim fso As Object, FolDir As...
  11. T

    Remove duplicates using SQL DISTINCT

    This code is taken from here: https://www.ozgrid.com/forum/forum/tip-tricks-code-no-questions/advanced-excel-integration/7960-create-a-unique-list-with-ado-sql-from-closed-workbooks-xl It removes duplicates using the SQL command DISTINCT. The problem is it works for a small column of...
  12. T

    Copying CSV to Excel

    Hi Everyone I have been using this code to copy data from csv file and merging it to a sheet. However, it has started messing up for some reason. Instead of pasting the data in new row starting from last row, it goes to the last column entry of first row and keep going to the next column (no...
  13. V

    Need modification in code. New Condition & New Logic.

    I need help on this code..Need some modification in it..and addition of some more condition... I really work hard to understand, but really I'm not that much, to insert any new condition.. Dim R As Long, X As Long, Cnt As Long, Data As Variant Data = Range("B3", Cells(Rows.Count...
  14. V

    want to separate form number and date

    Hi All, This is my new query.. I have this code.. Dim R As Long, X As Long, Cnt As Long, Data As Variant Data = Range("B3", Cells(Rows.Count, "B").End(xlUp)).Resize(, 2) For R = 1 To UBound(Data) Cnt = 0 Data(R, 2) = "" For X = Len(Data(R, 1)) To 1 Step -1 If Cnt < 4 Then If...
  15. NdNoviceHlp

    Does Column Exist?

    I've been trying to prevent user entry error for column entry. The following works for every column but "C" and column "C" does exist. I don't get it. Thanks for any assistance. Dave Sub RealColumn() Dim Outputcolstr As String, Lbstr As Variant, Cnt As Integer, Cfind As Range Outputcolstr =...
  16. J

    Copy a set of sheets and rename them

    I'm trying to copy a set of sheets that are paired by formulas to each other, a time sheet of sorts, and a corresponding invoice sheet. I can copy them no problem, but I'm having trouble figuring out code to: 1) make a copy of one master and place it after the master sheets then make a copy of...
  17. S

    Macro to open files in a folder, search a column for criteria, and copy those rows to a master sheet

    Hello =) I need help making a macro. I have a bunch of files in a folder, and I am trying to organize them. In sheet(2) column B in those files, there is a name. Basically if the name starts with MC / mc / Mc, I want the macro to copy over that name to a master, as well as its value from column...
  18. H

    VB Code to Allow Multiple Selections on Form

    Hi All, I have the following code that allows a user to make a single selection, via a user form, based on a lookup range. This works fine. The problem I have is that I need to make this a 'multiple selection'. My Code is; Sub Demo2() Dim Ops() As Variant Dim Cnt As Integer, i As...
  19. A

    Add if condition to my macro

    Hi there, I have a macro that (created with help from this form) worked fine for what i intend it to do, but later on i came to find that it needs to have a check to be performed on a cell value being empty or not before running the whole program. So, now when i tried to insert an IF condition...
  20. G

    Extract Row if Dynamic Cell Range is not Empty

    I've been tasked with creating functionality in our existing expense reports which will let us filter by months. The problem I am facing is the way the current expense report is formatted. TxID | Project Name | Vendor | Description| Apr | May | June | July | ..... On a different worksheet I...

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