excel-vba

  1. L

    Phone Number Formats

    Hi everyone! I'm currently creating a VBA that formats phone number. All numbers must follow a standard format. The scenario goes like this: In the user's selection, or highlighted part/selected part, all phone number formats will be "three numbers" "-" "three numbers" "-" "four numbers"...
  2. H

    Saving an excel file so that all the sheets open with A1 in the top left corner when the file is opened

    Hello I thought this would be a pretty simple process but I've spent hours trying to figure it out. The file I am working on is a custom report with two sheets. The first sheet has all the data, tidied up. The second sheet is a copy of the first sheet, before it was tidied up and so has all...
  3. S

    Autofit Column VBA not working.

    I have a code that checks to see if there is a change in Column C, and then autofits columns C:U, then hides a specific column. However, the code is not doing anything now. No errors occur, nothing happens to the sheet, and if there too many characters in a cell, the ### is all I see, which is...
  4. A

    Run-time error 9 Subscript out of range

    I am getting the subscript out of range message for my VBA code within excel. Can anyone help me figure out where I went wrong in my code? Private Sub HW2_2() Dim FileNum As Integer Dim DataLine As String Dim col() As String Dim MyArray(1 To 50, 1 To 15) As Integer Dim i As Integer Dim j As...
  5. S

    VBA to set a Cell's contents to a value, without changing the visual representation of the cell?

    It's a long-winded title, but here's what I'm looking to do: I want to set specific text strings to a number, such as CPT is 17 if CPT is in column C, 25 in column E, etc. Users should be able to go through the sheet and type in "CPT", where vba will check the column CPT appears in, and then...
  6. S

    Saving Excel File Path Creation

    I don't know if this is even possible. I am in charge of our template for work. I need to make sure our files are being saved properly and to a secure location. Right now, the workbook will save itself when certain cells are filled, and will autosave to a specific location every 20 minutes, and...
  7. S

    Trying to set a cell to locked or unlocked and I get an error '5' message?

    I have a checkbox that does a lot of work on a worksheet depending on if its value is true or false. It was working fine until today, I decided that I wanted to have the checkbox also Lock or Unlock a cell dependent on its value. The whole code is as follows: Private Sub CheckBox4_Click()...
  8. S

    Multiple Color Sorts in Worksheet

    <tbody> I am doing the same sort repeatedly in the same worksheet, only the rows are changing. I am basically sorting the worksheet section-by-section (each section being a group of contiguous rows). The repeated sort is actually 4 similar sorts. All four sorts are of columns D through R and...
  9. minhanh0011

    Function Translate extrack “DIV”

    ****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;"> <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit...
  10. M

    Excel VBA: Inserting Images into documents via Macro and Quality Issues

    ****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;"> <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit...
  11. E

    VBA help reducing chain of linked cells

    To simplify the issue: I have 4 worksheets in my workbook: "Business X", "Business Y", "Totals" and "Summary". The formula in cell A1 of "Totals" is: ='Business X'!A1+'Business Y'!A1 and the formula in cells A1 of "Summary" is =Totals!A1 I want to cut out the middle man ("Totals" worksheet)...
  12. G

    vba - copy filtered data to table

    Hi guys, I try to filter data that I have in Macro file in DataSheet ('DS'). I need to take filtered data only (w/o header row) & copy it into different workbook/sheet 'SFDCReport', where there is a Table (Header row on line 12, 1 data row on 13). With this code, I received some Error 1004 -...
  13. A

    IF statement with multiple parameters and overwriting cell values in separate sheet

    Hello, I have a scenario/idea I would like to try but honestly, I am not good enough with VBA to get it done in a reasonable time. I'm aware this isn't a "Code for me" site but I thought I'd describe the scenario as detailed as I can and see if someone can help me or give me an idea of how I...
  14. C

    Copying Cell-Value if target Cell is not empty - absolut beginner

    Hello MrExcel Community. I want to make a huge excel file, that so far needs multiple manual inputs of the same data, easier to use. Sadly formulae dont help anymore and I need to do it in VBA. Although - with my inexistent knowledge of programming - google helped me to answer most of my...
  15. C

    Button creating sheet to new workbook

    Hello! In the code below, I have a button on a user form creating a new sheet based from a template sheet, and renaming it. I want to know if its possible to have this sheet being created and renamed to be created in a different workbook? Anything helps. Thanks. Code: <tbody> Dim i as byte, sh...
  16. C

    Sheet to Template Sheet

    Anyway to get the spreadsheet created in the code below to be the same as a template Sheet I separately created? Code: Dim sh As Worksheet Set sh = Sheets.Add sh.Name = AddEmployeeUF.txtFirstname.Text + AddEmployeeUF.txtMiddleinitial.Text + AddEmployeeUF.txtLastname.Text +...
  17. S

    VBA Code if cells D2 = I2 then make D2 Blank

    Hello, I am trying to find any way i can make it work.. lf anyone can guide me whether this can be done using vba? I have a data sheet in that column d as data like IA12100/IA12108/A12101/P13108/H98308/615520/i752381/ii4251 and we have exceptions in column I which will be same as Column D but...
  18. C

    VBA, FIlldown formula with changing cell reference

    <tbody> </tbody> <tbody> 0down votefavorite I have a Sumifs function to be done in macro with 2 criterias. my excel file is quite big. So my code looks like this : <code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation...
  19. T

    Macro to Update Data on Table From Seperate Sheet

    Hey all, I will get right to my question. I am trying to make a macro for a spreadsheet I've been asked to look at. There are 2 sheets that I'm focusing on this spreadsheet which are named Search & Update and Master. Master has a table named Table 1, which starts in column A to column Q. It's...
  20. E

    Update details in the specified month and the rest of the year

    See a data entry form attached which is to be used to track staff movements, changes promotions over time. http://www.filedropper.com/formsheeteditopttest2-creatingonemastersheetv8forstackoverflow The data (AssociateData) lists all workers in the team and each worker has a row per month. The...

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