cnt

  1. M

    Counting and updating dupes in an array

    Hello Excel VBA Masters, I'm hoping someone can help me with my current challenge. I hope to cycle through a one dimension array and when a duplicate piece of data is found the first instance of a duplicate has "dupe_1" appended to the data. If a second duplicate is found it will have "dupe_2"...
  2. J

    VBA, IE getelements, change to xml http

    How would I adapt the following code please so I could get it into a XMLHTTP web pull instead? e.g. Private Function getprices(ByVal URL As String) As Variant Dim source As Object Dim Http As New XMLHTTP60, Html As New HTMLDocument Dim ret(1 To 1) As String Dim elem As Object With Http...
  3. J

    IE.Document.getElementsByTagName("A")

    So I have some code which pulls URLs from URLs by tagname if it contains the If Instr in the code below. I'd like this to focus just on one section of the webpage, Div Class: Div Class: product-list-container and exclude: Div Class: recommender__wrapper The code is as follows: Sub...
  4. D

    Listbox values from userform in one cell in a worksheet

    Hi all, I try to find the code that would allow me to put the values of a listbox from a userform in one cell of an excel sheet. Below For b = 0 To ListBox2.ListCount - 1 With Cells(5, 24) .Value = ListBox2.List(b) End With Next Or Dim arrItems() Dim cnt As Long Dim I As Long...
  5. F

    VBA: Set column widths

    I found the post below, but was hoping this could be done a manner where the array is written left-to-right versus up and down. As this is it works for my needs after I expand the ar(1) out to ar(15), just hoping it could be shortened. I'm starting with column A and setting out to column O...
  6. H

    put results on worksheets in another workbook

    I'm using this code to count items on each worksheet in workbook 1. How do alter the code so that this part (ws.Range("C1").Value = cnt) is put into a different workbook? both workbooks have the same sheet names, if that helps. Thanks! Dim ws As Worksheet With Sheet1 Dim x As Long x...
  7. H

    Count Multiple Items in Same Column

    Hi - How do I add another variable to this code? I want it to count how many times "Apple" or "Pear" appear in the column? With Sheet1 Dim x As Long x = .Range("A" & Rows.Count).End(xlUp).Row Dim cnt As Integer cnt = 0 For i = 1 To x If .Cells(i, 1).Value = "Apple" Then...
  8. H

    Tracker based on Sheet Names

    Hi - I have workbookt1 that has all of my data in it, and workbook2 that i want to use a tracker. The code i'm using is below. Is there a way to use the sheet name a a variable in place of "Apple" and "Pear"? Both workbooks have the same sheet names and ideally the code would put the totals...
  9. P

    Filter Sheet2 Data based on Sheet1 List Values

    Hi can anyone help with a macro? I have many hundreds of rows of Data on Sheet2 "A1:Z" with headers. "A2:A" has 'Ref values' for each row of Data. Sheet1 column "R5:R" has 'Ref values' added that change daily. I want to Filter Sheet2 "A:Z" using "A2:A" as field, based on the Values entered...
  10. P

    For Each Loop and Functions

    I imagine this is painfully simple, yet all my research and trying to figure it out on my own has led to failure. I've learned how to create a button in Excel and create code in VBA to have that button change cell values. The problem is that right now I only know how to affect one cell at a...
  11. sharky12345

    Help declaring a variable

    Can someone please tell me how I should be declaring the following? With Me.ListBox1For i = 0 To .ListCount - 1 If .Selected(i) Then ReDim Preserve arrContacts(cnt) arrContacts(cnt) = .List(i, 0) cnt = cnt + 1 End If Next i End With If cnt > 0 Then Students = Join(arrContacts, "; ") End If...
  12. B

    Excel 2000 VBA feeding a value to a formula

    Good afternoon! Currently I pull a huge text file from the AS400 monthly and dump it in my project workbook, then format it. I now need to be able to modify the cost field by in VBA using a multiplier. Currently the AS400 file comes in with 63,289 rows. I run a macro to delete all page...
  13. E

    Delete sheet if it's name is matched n a range on another tab

    Hi, I need to macro to check all sheets within my work book and if the sheet name is matched in a named range("specific activity" located only on sheet "all lists") I want to delete the sheet/s when their name is matched in this range. I've been searching and found different examples but I...
  14. H

    Row2 6 numbers are present in row4 6 random numbers

    Good morning Masters, Please help me to update the codes below. My situation is I want to stop the codes running if it all the numbers in the Drawn Row are already present in the Ticket No 1 Row even if it is not on the same order as in the drawn. A message box will appear once this is achieved...
  15. ryan0521

    How can I simplify this one?

    'one If mwkb.Sheets("Cover Sheet").Range("ab11").Value = 1 Then Set Wkb = Workbooks.Open(PATH1) mwkb.Sheets("1").Cells.ClearContents Wkb.ActiveSheet.Cells.Copy mwkb.Activate Sheets("1").Select Range("A1").Select ActiveSheet.Paste...
  16. I

    VBA: Copying cells until empty cell is found

    I want to copy the values from column E from Workbook IID.xlsm until an empty cell is found. And paste them into Placeholder.xlsm column A. I have the following code but I get an error on the third line <code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant...
  17. E

    Detect option button, exit, recheck, proceed

    Hi - new to forum. I have a userform which requires one of 5 option buttons to be selected. After pressing the command button in the user form, i want to check that an option button has been selected. if it hasn't a message should appear to warn user that they need to select a button. After...
  18. W

    count the number of hidden windows

    I need to count the number of windows that are hidden and display a pop-up window. My code keep giving me "0 hidden windows" no matter how many windows I've hidden, please help. Sub Hiddenwindows()Dim Cnt as Integer Dim Win as window Cnt=0 For each Win in Windows If Not Win.Visible then Cnt =...
  19. J

    Copy my data to my workbook from another and add the name of the intern on the first column

    Hi guys, I need some help on updating my macro, When I will click on the macro using this one below, I will want to pull the name of the intern and copy automatically in the column A for the number of rows that the intern created on his/her spreadsheet, I have a lookup table of the name of the...
  20. E

    Excel to Word - Highlight values replaced in a Word document

    I am using the following code to find and replace values in a Word document with values from my Excel workbook. I would like to highlight values as they are replaced in the word document so the user can identify the values that were added from the Excel sheet. Can someone please help me figure...

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