vba & code

  1. M

    Clear all slicers, and timelines in a pivot table

    Hi, Is this the right VBA code to clear all slicers, and timelines in a pivot table? Sub ClearSlicersTimeline() Dim slcr As SlicerCache For Each slcr In ActiveSheet.SlicerCaches slcr.ClearAllFilters Next End Sub Also asked here VBA code to clear all Slicers and Timeline objects in the current...
  2. J

    Trying to save Excel unhide worksheets as pdf VBA code

    anyone helps me please? When I am working, I am using vba for saving excel each worksheets as pdf. Sometimes, I don't need specific worksheets to be saved as PDF. Please help ( :
  3. montecarlo2012

    ("vba & code")// counting cells

    Hello. BC201132435465798798109112123134145159167178 In column B2 I have this array and in C the answer. Trying to count how many cells are until a value is found. this is the try: Sub Locat() Set rngData = Range("b2:b25") For Each cell In rngData If cell = 9 Then Range("c2").Value =...
  4. G

    VBA - Quick tweak to an old solved&closed thread

    Hello all, I was looking for some help to tweak the code posted by Trebor76 several years ago in this thread: https://www.mrexcel.com/board/threads/vba-to-copy-row-to-another-worksheet-if-cell-value-is-found-in-a-list.1183144/ It is very close to what I am trying to accomplish now but there is...
  5. T

    Creating new sheet

    Hey, I need some help figures out solutions to the problems below. I have created a basic macro using the recorder but it is limited in helping me solve these problems. Problem Description: 1. I need to create a commandbutton that allows users to add new clients to the workbook. But to do...
  6. Guna13

    VBA loop copy paste one Standard Color with Formula column multiple times together with Header in Same Sheet

    Hi All, I am trying to code a loop in VBA Excel which copy and paste Second Standard column with Fomula and Color too as the number of Comp Name Count base. ( Example in Master_data Sheet, I have 3 Comp Code mean, then three Time this Standard B Column together with the header and Formula copy...
  7. Guna13

    End process If Formula contains #N/A in Column

    Hi All, How can I end process If Column From "M:AA" Formula contains any #N/A. also, Please before exit, it will show Exact Row Number & Column Number in MsgBox. Like 8 rows & Z column Like that. kindly help me. Sub Validate() Targ.Select If WorksheetFunction.CountIf(Columns("M:AA")...
  8. Guna13

    Standard Template Update from Working File automatically

    Hello, As a newbie to VBA macros, I've started working with Sheet Update, Range Consolidation, and a small, small macro. Unfortunately, I am struggling to update this Standard Template description information from the Master Working File automatically. (Because in between multiple lines are...
  9. G

    Run time error in VBA.

    Hello everyone I am facing this problem to automatically download the file. anyone please help me to fix this issue . below is a code Public Sub DownloadFile() Dim objIE As InternetExplorer, currPage As HTMLDocument, url As String Dim elements url =...
  10. C

    Copy Data by month to table using Inputbox with Add or Delete Row

    Hello Folks, I neel little help to copy data from my Sheet(WrkingSheet) and Paste to TablebyMonth in another sheet (Diff) (didn't get attach option, so attached mini-sheet). Month name will provide in Inputbox, and acording to month provided, data of that particular month will go in the Table...
  11. E

    Trying to set a function as oldrows count before the delete row command is activated

    Please help to make the function count the oldrows Public Sub Delete_Or_Insert_Rows() Dim NewRowCount As Long Dim OldRowCount As Long Dim LRow As Long Dim rng As Range Dim ws As Worksheet...
  12. R

    VBA check the date if matched then copy and paste the data into their group

    Hi there, i need a hand to help me with a simple VBA code, i got my sheet1 here ABC1DateTeamName205/10/2022ALupin322/10/2022AFox405/10/2022BRuby522/10/2022BSusan605/10/2022BGarland705/10/2022AAnthony and here is sheet 2, i simply want to list their name in sheet2 here which matched their date...
  13. A

    Calculate variance from combined rows with nested loop for all columns (VBA)

    I have started to use VBA and I have the following problem. I want to calculate the variance of the 6th and 9th row. Then, 6th and 12th row (yellow). The loop should then calculate the 7th and 10th and 7th and 13th row (beige) Finally, the loop should then calculate the 8th and 11th row, 8th...
  14. S

    update the code to work in the fastest way possible

    I got the below code while searching in MrExcel. My request is to update the code to work in the fastest way possible. I have many thousands of rows of data and it is taking hours. The code should not work in the sheet "Secret code". Please help. Sub blah2() For Each cll In...
  15. M

    Excel VBA Macro

    Hello I want to start out with saying am not familiar with VBA programming and have been struggling with this task. I have been trying to do some research and figure out what I need to do to accomplish my task. What I am trying to do is go into a folder and pull specific data out of some excel...
  16. montecarlo2012

    Code does not always return the right answer.

    Good afternoon, everybody, I hope you got a good weekend. Sub Distance_one() Set rngData = Range("B2", "B40") For Each cell In rngData If cell = 5 Then Range("E2").Offset(0, m) = n n = -1 Else n = n + 1 End If Next...
  17. montecarlo2012

    VBA & code - counting cells between colors.

    Hi. How is possible to count cells between the color cells? here is my example...
  18. montecarlo2012

    Counting locations for the first time only

    Hello. Where is the numbers of the column H at in the last time Taking the B2:F2 as the last line. And the counter will display the results on I The numbers to be search are on column H So for example number 1 is founded at number 9 position For the first time, that’s all I want, no the...
  19. U

    Issues with excess months in a 9 months period

    Hi all, I'm struggling with this table generating an additional month 4-9 for 2022 in October Please have a look at my code, as I fail to see the issue here. Dim Months, Years, Monthss, Yearss, Monthsss, Yearsss As String 'Find next month from today with 2 digit month number If Month(Now)...
  20. montecarlo2012

    Scraping HTML Table with VBA

    Hello. After trying around, then //: help needed anyway Sub test() Dim ie As Object Sheets("Sheet2").Select Dim i As Long, strText As String Dim y As Long, z As Long, wb As Excel.Workbook, ws As Excel.Worksheet Set wb = Excel.ActiveWorkbook Set ws = wb.ActiveSheet...

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