vba excel

  1. U

    VBA: Open Password protected file in Excel

    Hello Gurus, Basically, I need to open password protected PDF file even on read-only. I found this code online and wanted to ask if you can help to update the code. = = = = Sub Workbook_Open() Application.DisplayAlerts = False 'Change 1234 to your file password accordingly Dim pdfPath As...
  2. E

    Summation based on each chunk(blank cells)

    I would like to do sum based on each chunk, my code is taking the whole column instead. I can't figure how to write a loop that stops at the blank cells. Sub Button9_Click() Dim LR As Long LR = Range("L" & Rows.Count).End(xlUp).row Range("N2:N" & LR).Formula = "=L2/SUM(L2:L" & LR & ")" End Sub
  3. D

    using a header as an identifier for an input range

    Hello using VBA, i am wondering if this is possible. I have a cell that is a header, to be an identifier i guess you could say. So i have batches and inside i want entries starting at cell A51 that contains the words "Schedule A" and I have data points that I want to copy from that section of...
  4. D

    Error when using GetOpenFileName vba

    Using VBA, how can i edit this code. I have a cell in sheet called "file paths", in that cell is the exact file path of an xlsm file. I am trying to use GetOpenFilename and use that string that is in the file path cell the file path in that cell is: C:\Users\ThisPc\Desktop\Book1.xlsm Code: Sub...
  5. H

    Putting VBA code to prompt to open a file

    Hi Friends, This is Captain H from Saudi Arabia, I am a newbie in VBA excel and was seeking to get a solution as to what code can get the system to ask me what file to open in the external link in VBA excel. Please if someone can help me, would really appreciate it.
  6. W

    Vba to include values of specific cells selection to the subject of outlook mail

    I select data from excel workbook and send to outlook. I need to update the below Vba code to include values of specific cells in columns (F,G,H) corresponding to my selection to be in Subject of Email , but I do not know how ! For example: Work orders need review @” ……… , …………, …………. [![Sheet...
  7. Y

    [vba] Pull Data from a Specific Sheet in another Workbook

    I get this code from this site: Excel Macro to Pull Data from another Workbook Option Explicit Private Sub CommandButton1_Click() ' Create and set the file dialog object. Dim fd As Office.FileDialog Set fd = Application.FileDialog(msoFileDialogFilePicker) With fd...
  8. N

    How to keep the validation List available even after paste

    I have a cell has a list countries , when I paste data, this cell will have a new information but the list will be disappeared ! how can I keep the country List available even after paste . Regards
  9. E

    Run a Macro based on a cell value

    I have a summary tab where i want to run macros depending on what is selected in a drop down list to compare two other data tabs. The data tabs are called 'A', 'B', 'C', 'D', 'E' and 'F', and the data in each tab is in the same cells and format, just different values. I want to have two drop...
  10. E

    Format the selected series in Chart in Powerpoint

    I would like to create the macro which will format the selected "DATA LABELS" in chart in powerpoint. Below is my code. But the problem is Im not able to write code for selected "Data Labels". Please assist Sub testSelection2() Dim shp As Shape Dim count As Integer Dim left_count As Double...
  11. M

    Copied Date Data is NOT a Number

    Hi, How do I copy date data retaining its number format? Dim Sourceworkbook1 As Workbook Set Sourceworkbook1 = Workbooks.Open("[File path & name]") Application.ScreenUpdating = False Sourceworkbook1.Sheets("[tab name]").Copy After:=ThisWorkbook.Sheets("[tabname]") I have written a matching...
  12. Z

    Copy and paste

    Hello, I am trying to copy a block of lines (the red one for ex) from a source sheet to another sheet using a button to show a userform and then choose specific elements. The source data are: Well, in my userform I have to choose the test, number of test, Week and year: and then the...
  13. L

    VBA Excel, group rows and perform an action for each group

    Hello! I have an excel like this: So I have column A, I want column B to complete automatically. I though that by entering a blank row between groups it will be easier to separate groups. So it will go down the column A and for each not empty row it will write Iph in column B, when it finds...
  14. S

    Copy Specific Sheet of multiple workbook to multiple sheets of another workbook

    The below VBA code breaks if the name of the workbook or there is no workbook exist. In my case, the VBA code breaks on opening workbook wbR4 due to difference in name and the code stops there itself and not proceeds to next workbook. The code is about to copy specific sheet of source workbook...
  15. Z

    Duplicates items in a listbox

    Hello, I am new in VBA programming, I have data on an excel worksheet in column A cells(23,i) and A celles(24,i) ordered like this I want to show the data in a listbox without duplicates and showing only recent dates for each value (N IT) like this: To show the list I created a button, and...
  16. L

    Active cell value in other Worksheet selected and marked

    Hello community, I try to create a macro which helps me find the value of a cell in other open worksheets. I have the value of the active cell in worksheet "KS" and i want to get the cell with the same value from worksheet "BGF" selected. If possible both cells get hightlighted with red...
  17. P

    VBA code to download zip and extract csv file from it and save with specified name

    I am having a simple application in excel to download all zip urls in column "C" column "C" has urls and column "Q" has names Every url has 1 zip file and every zip has 1 csv in it. What I want to do is to 1. unzip the CSV files and save them with names as mentioned in column "Q" 2. Kill all the...
  18. N

    Calculating Percentage difference VBA Excel facing RunTime Error 91!

    While the percentage difference works for current month vs previous monthly, and vs previous year without issues for the 40 +sheets within the workbook, i experience runtime error 91 when using current month vs closest quarterly number calculation. Attached is the screenshot for reference. I'm...
  19. M

    Looping through Worksheets in Workbook while looking for specific text

    Working on a macro that will loop through Workbooks in a folder. Within each workbook it will loop through all the sheets looking for a specific string of text. In this case "*Labor*". My sample workbooks, has 3 sheets with "Labor" in the WS name). Once it finds a match the macro will copy and...
  20. K

    VBA Reference Unsaved Files

    Hello, This is probably a quick fix but for the life of me I cannot figure it out. I have a project that references an open unsaved file ("Invoice Data.xlsx"). Every day a new file is emailed to us with invoicing information. The macro file imports the relevant data and runs some calculations...

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