vba excel

  1. H

    Convert days into the hours in Userform

    Good Morning i have got a user form whereby it inputs the total number of days between the two dates selected from a calendar, however, i would like to convert this into the hours instead of the total days Sub Calculate_Days() Me.TextBox7 = "" If Me.TextBox2.Value <> "" And...
  2. B

    loop through time range and replace variables

    Hello i've got a Makro which calls a link and it download a cvs file. This link needs 6 variables to work, example: h t t p s : //blabla.com/ startdate=var1 & starthour=var2 & startmin=var3 .. etc would result in h t t p s : //blabla.com/ startdate=2023/01/06 & starthour=23 & startmin=30.. etc...
  3. K

    VBA Merge cells in range

    Hi all, I am trying to merge cells using macro, but it works quite oddly and I cannot pick the mistake in code. Code: Sub testee() Application.DisplayAlerts = False Dim rng As Range MergeCells: For Each rng In Selection If rng.Value = rng.Offset(1, 0).Value...
  4. A

    Error when running macro

    Can anyone help me to solve this syntax of of adding file path to TEXTBOX This is my UI form
  5. B

    VBA Subtract until a certain value with condition

    Hello All, looking for some guidance on this problem I am stuck on. I am sure it is doable just can't figure it out at the moment and my vba skills are not the best. Below is a table and I am looking to subtract until amount is zero with a condition to not go under $25.50 in Column B. So...
  6. M

    Sorting array code in VBA (Excel) not working correctly

    I wrote the following code which creates a 3 by 3 table and then sorts the columns from smallest to biggest depending on the values in row 1 (second row). For some reason, with the values below I get to a point where the code does "If( 2>1) Then" but the code then says its FALSE and skips, I...
  7. dss28

    select and delete multiple rows in a listbox and then corresponding sheet

    At present I have a code to select and delete one row from a listbox and the corresponding sheet. However i need to modify it to select multiple rows from the listbox and delete them from listbox as well as the corresponding data rows from the sheet. please help to modify: i am using the...
  8. A

    MACRO EXCEL - create multiple txt files from excel with a condition

    hi i need to find a way to create multiple txt files from an excel, as shown in the picture. In detail i need to create a file txt with the name "sez-A1" and another "sez-A2" and so on. inside the txt i need to have the numbers of the 2 columns x and y from the excel
  9. C

    VBA dates

    Hello! I am new to VBA excel and i have a homework where i have years from 2000 to 2030 and i have to find Advent 1st for each year. Can anyone help with this? Thank you!
  10. dss28

    to do list in calender

    I have designed a calender with a to do list in which each row is assigned for to do list serial no. and columns have dates. when a cell is clicked it opens a userform1 with 4-5 textboxes/ comboboxes, which now at present is filled manually by selecting the particular row and date column. The...
  11. dss28

    Identify row number of the data in a listbox

    I have a listbox which is filled with data transferred from textboxes in the userform and not from sheet. The listbox has multiple rows and columns. I have also added a code to delete a row before final saving of the data to excel sheet. Hence if I try to give / add a row number through a...
  12. dss28

    Capturing data in rows for number of days selected in calender

    I want to build a data base using a userform1 having say 4 textboxes to input data textbox1 - Name textbox2 - address textbox3 - Start date textbox4 - end date the sheet1 where data will be saved will have columnsA as Name, ColumnB as Address, ColumnC as Date. I want to capture data in sheet1...
  13. A

    VBA for Merge and Center Dates based on condition met.

    I do a LOT of scheduling people at my job. Kronos spits a nasty excel sheet with 1000's of rows and about 40 columns. I've got created enough macros to where it fine tunes it to what you see below BUT I would like to do a few more things to really make it so I can print these schedules for staff...
  14. 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...
  15. 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
  16. 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...
  17. 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...
  18. 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.
  19. 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...
  20. 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...

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
Top