vba excel

  1. B

    NOvice needs code to combine function and sub

    I'm brand new at using VBA. I searched for a similar problem here an in other forums but can't seem to find the exact issue. I have a workbook with two sheets. One contains inventory info ( product number, description, price and number sold). Sheet two contains product number, description, and...
  2. B

    Run-time error '1004':

    I have some VBA that has worked in the past without a problem but will not run anymore. The VBA deletes all the sheets in a workbook that are not listed. If searched the forums and there are several posts that suggest replacing "Sheets" with "Worksheets", but this did not work for me. The error...
  3. M

    Unexpected behavior in VBA code

    Hello, I've written some code that converts 1500 data points to about 200 (copies every 20th data point to the right), since Exel can't use more than 250 to draw a graph. So the wird part is, if I use the code below, everything works fine, but if I devide the result by 10, I get "0" in the...
  4. C

    VBA to Compile List from Multile Sheets.

    Hi, I'm stumped with the following problem. I have a software output that is exported to Excel in a matrix with combined text and numbers. There are merged cells left right and center BUT I prefer NOT to unmerge them if possible for ease of visual analysis later. Several tabs each...
  5. L

    upload acces database specific columns from excel which have same but uploaded columns

    I would like write a program in excel with VBA which can upload an acces database from the same already uploaded excel sheet. I'm trying to use SQL statements, but I think it cause a problem because i have already checked the connection and it's connect to a database. Can you help me how to fix...
  6. A

    (VBA) Trying and failing to get q to M values from columm B to columm 12 and beyond

    currently i have thisin this 1º button i ask the number of jobs and randomize the time for those jobs between 1 and 10 in columm B <code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit...
  7. V

    Find a Date&Time between two Dates&Time

    Dear All, I want to find out a time which is greater than a time and less than another time. Please see the below data: <tbody> Date & Time Transaction Type 03/01/16 8:38:36 I 03/01/16 18:36:02 O 04/01/16 8:12:28 I 04/01/16 17:23:44 O 06/01/16 8:14:30 I 06/01/16 19:17:40 O...
  8. V

    Cut certain cells in row and paste in Sheet2 if cell in row equals "Yes" and put last

    Hello! I have alot of trubbel finding a vba-code that permits me to do the following: 1. I have one sheet with rows and I want to copy certain cells in each row to another sheet (always the same cells to be copied), creating the same row but with only the certain copied cells that I wanted...
  9. P

    VBA Search Engine Only Carries Over One Cell Instead Of The Cell's Entire Row

    Greetings, Currently I’m struggling to create a search engine in vba that compares user ID’s on two different sheets (sheet1 & sheet2) and then returns the results of the search onto sheet3. So basically vba searches through Sheet2 to see if it has any matching values to Sheet1...
  10. V

    VBA help with copy pasting rows

    Hi, I have been trying to set up a VBA code that helps me move rows with the word Sam in column A to the bottom of the sheet (the number of rows with this word changes everyday). I have managed to set up a code that copies the data but it always pastes it in the same row (i.e. row 540) even if...
  11. I

    Compare two workbooks and highlight the differences in the third workbook

    I have created a macro which compares all the sheets of my Workbook1 with the sheets of Workbook2 and highlight the differences in the third workbook (sheet by sheet) I have categorized the differences into different headers Like:- List Entered Value Changed.- Text When Value/Text is replaced by...
  12. I

    Compile Error : Expected Function or variable while replicating grouping format

    I have created a userform which has two Listboxes (Listbox1) & (ListBox2) which list down all the worksheets name present in the workbook. ListBox1 is my source sheet and Listbox2 are my Target sheets I have an OptionBox (OptionBox1). Basically I want that when I select a sheet from Listbox1 and...
  13. H

    Match + Index for a Range that consists of multiple Columns

    Dear all, I would like to get your help! I have an Excel file in which Sheet1 consists of multiple cells. My lookup_value is C4. C4 is a value that is calculated with the following formula =LARGE(04:T4,1 where 04 - T4 are the five largest values of named Range and Range=...
  14. H

    How to Insert Workbook_SheetCalculate Event

    Dear all, I have written the following code: Workbook_SheetCalculate(ByVal Sh As Worksheet) Dim myRange As Range Dim product As Double Dim n As Long Set myRange = Sh.Range("N1:N50,AA1:AA50,AN1:AN50,BA1:BA50,BN1:BN50,CA1:CA50")...
  15. H

    Workbook Calculate Event with Mee

    Dear All, I would like to get some feedback how to write my desired module. ]I have a file in which column "O2:O50" is changing as new data is collected from an external source (Bloomberg). The same applies for "AD2:AD50" and "AS2:AS50". Now I would like to get a message if one of the values...
  16. A

    VBA to file save as in the format of .xls

    Hi, I have a macro that generates a Journal entry form and I found a simple code to open the file save as window so my team can rename the file to what ever they want. But I would like to have the format automatically save as an excel file. Is there easy code to do this? I used the simple code...
  17. D

    VBA code based on cell list and create new worksheet

    Hello all, We have a routine task where we copy and paste the PnL information but with different customers to new worksheets. - In the sheet "PnL", I have a Pivot table that I can filter different customers to see Revenue, Margin and Costs information. - I have to select each customer/plant...
  18. P

    Looking for 1.00 difference in 2 columns

    Hi. Let me be brief: I have values in 2 columns B & C. Column A has 1,2,3,4,5,6,7,8.....to any number. I need a code to multiply column A values with column B & C values separately with both resultant values substracting from each other until a 1.00 difference is detected. Example (a): 0.74...
  19. S

    Adding hours to datetime within varied working hours + past midnight

    Hello everyone, My first post here, I've searched the forums extensively for a past week but couldn't find exactly what I'm working on. Unfortunately my case has some weird details . I'd like to ask you for help as I'm stuck right now. Here's the table showing what I mean: <tbody> start...
  20. S

    cell marked in red

    I have a sheet of 800 rows and 260 columns (A1: IZ800) and each cell contains the data are very diverse. I want to use VBA to look for in each cell the number of characters on the left before the x and if more than 4 characters are given red cell if VBA is run results: 8654x4289 <- ignored...

Some videos you may like

This Week's Hot Topics

  • Launch Script When Tab Is Opened
    Hello all! Is there a way to launch a script or message every time a particular tab (DATA1) is selected/opened? I know it can be done when...
  • VBA that can extract words that starts with # and ends with 2021.
    Hi Everyone, I am straggling to in searching for a vba code that will extract a string that starts with # and ends with 2021. The string has no...
  • Date update overflow error ‘6’
    Dear MrExcel community, I have a project search & update & add & delete can do. There are 32 column and 5 of them is date. When I search date...
  • VLOOKUP Formula ?
    Hi i am using this below but i need to return Column C on Detailed_view. You can see ,1 this returns D, but i need to return C before D. I tried...
  • conditional formatting the whole row
    Hello This is a question solved earlier by etaf. But I am getting some problem. I need help to correct the formula as it is not working in some...
  • Vlookup in vba
    Hi, I am new with the VBA, can someone help me, I have made this macro, but the loop across files in a directory runs only in cell G13, and I...

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