vba excel

  1. C

    For Each Loop VBA Code Running Very Slow

    HI I got the following code from a forum a while back. It finds merged cells, un merges them and fills in the cell value. [CODE][Sub UnMergeFill() Dim cell As Range, joinedCells As Range For Each cell In ThisWorkbook.ActiveSheet.UsedRange If cell.MergeCells Then Set joinedCells...
  2. J

    VBA to delete criteria is deleting my first row regardless of criteria.

    Hello folks I worked out a function and a procedure to help me find the last row and then delete filtered criteria. If there is not criteria, then leave the data alone. However, the procedure does filter and delete the data based on the criteria, but if there is no criteria instead of leaving...
  3. A

    VBA code to copy specific cells in column from one workbook and paste to another

    Hi, Sorry if this question has already been asked but i think I do have a specific case. I'm willing to copy data from column C to column O from a first workbook and past it to another workbook from column A to column M as below describe ; Workbook named Doc1 and worksheet named Query (copy)...
  4. Y

    VBA msgbox

    So i made this sub that makes a new sheet called "Statistics" in which there are some pivot tables. I made it so i was able to overwrite the sheet if it already existed. Now i'm trying to figure out how to make a msgbox that asks the user if he is sure that he wants to overwrite the sheet, if it...
  5. S

    Error 1004

    Hi all, I'm trying to select a range of cells in a data sheet defined by integers k and l. I need to select that range before I input it into a pivot table (code not shown here) When I use the .Select property I get a Error 1004. Any advise would be welcome here. ActiveSheet.Range(.Cells(k...
  6. C

    VBA - Send email with attachments to range (row by row)

    Hi, I have a spreadsheet which I seek to list client email address details etc. Due to a shortfall in our finance system. I seek to email attachments based on this info. I am having difficulty getting code to attach the specified attachments to emails (attachments are specified in Columns...
  7. O

    VBA code

    Hi Guys, Please help me on below query. I need a vba code for below example. If there is an excel formula then that is also okay. Question: So if there are numbers on Row 3(see table below), I want it to return the text from Row 1. From below example. I want the code to return this. "Dec...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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=...

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