1. M

    Macro to change one cell on a sheet, save sheet as PDF, then loop back and change that one cell on that sheet and repeat until the end

    Hi all I am in the process of creating performance reports. I am looking to save multiple PDF documents from one sheet however I need one cell to change before each saves to PDF. Excel Document Overview Sheet 1 = Report Template (A1:K34) Sheet 2 = List of Employee's names (B2:B151) Sheet 3 =...
  2. J

    Loop in outlook adding more attachments than intended - Outlook VBA Excel

    This script creates emails with invoices for customers. The way it does this is sorting by customer name through a list and then adding the corresponding invoice. My problem right now is that, although the script is adding the correct invoice for each customer, it is also attaching the previous...
  3. B

    Divide Range in smaller Ranges based on Cell-Values

    Hey MR. Excel Members, I know the title sucks but let me explain as I think this is fairly easy but I cant manage to solve it. I have a table that looks like this: Now I want to loop through this table and set a range named "xvalues" to the B-column values for each platform (entry in column...
  4. Jasen79

    Loop stopping at row 10

    Below is a code I had a lot of help with from user such as yourself. This code worked well but now is stopping a row 10 and I can't see why! Could one of you please be so kind to point out why this is happening and how I might fix it? What should be happen in short is and does up to row 10, is...
  5. M


    I am trying to figure out how to continuously do a function starting from x = 0 to x = 20 with an increment change of 0.1. I want to use vba to list all the values that resulted to a sign change in an array but I have no clue on where to start. Please help.
  6. C

    VBA loop to collect data from all sheets

    Hello, I need to search through all the sheets in my workbook and gather data from a range of cells, and return that to a "Master" sheet. The range will run from cells "J9:M9", but will vary in amount of rows for each sheet (maybe 1 row, maybe 100+ rows). Obviously I'd like to omit searching on...
  7. E

    Macro to Cut Last Column with Data

    Hi! I’m a beginner trying to program a macro that will cut the last cell in a row with data present and paste it to a specific cell in that same row, before going to the next line and looping. I’ve run into all sorts of issues trying to record the macro and programming it myself. Some cells are...
  8. L

    For Each / Do Until Loop Hit a Wall :-(

    Hi everyone, so I've been working at this problem for a while and can't get the code to produce exactly what I need. I have a spreadsheet which is essentially going to print to an A4 sheet of 8 labels. On each label I want a customer name and order number, which is input via a UserForm. The...
  9. A

    Looping FindWindow inside a userform

    Hello all, I have a managed to find and modify some VBA that will locate as "Save As" window and then paste a file location inside it. My challenge, is that once time expires, a message box pops up prompting a stop or retry. What I am trying to do is instead of a message box, change a few...
  10. Z

    Upgrade Macro to populate cell and then print on loop

    I would like to upgrade an already answered question in a thread: Macro to populate cell and then print on loop I want to upgrade in a way that in addition to increasing a number in a cell and printing to take a value from a cell and save it with the name in the cell and also to the same time...
  11. M

    Multiple VbQuestions Fn intersected with loop IF

    I need to use vbquestion 4 times as below 1. The first one asks if you need to upload the first file or not 2. Then asks for the second file 3. Then asks for the third file 4. Then asks for the fourth file 5. Lastly shows a message for the selected files using a string variabe if the...
  12. B

    calculated column counting consecutive identical values

    Hello master minds :) , I have a Power BI data set with TimeStamps. Each are 15 minutes apart. I would like to create a column that counts the number of consecutive timestamps with the same StatecategoryName. This is an Excel sample of my data in columns 'G'-'I'. The results I want to...
  13. A

    Looping a find window

    Hello all, I really haven't mastered the concept of doing a loop in VBA (seriously need to find a good resource to practice with), however, I have a code that will find a window and pull it to the foreground, but if the window doesn't exist, I want to wait for five seconds and check again...
  14. I

    Loop through list of inputs to two cells, calculate workbook and record output to next line of output sheet

    I have two list of inputs one column for postcodes (=input!A1) and one column for quantities (=input!B1). I want to take the first postcode, enter it into a specific cell (START HERE'!$E$11),then enter the first quantity into a specific cell (=SITE COMPOSITION'!$D$33), calculate the workbook and...
  15. K

    IF Statement when multiple conditions are met VBA

    Hello, So I am trying to write a script that if column d has a value in it and column g has false then nothing happens. However if column d has a value and column g does not equal false, then it should turn red. Here are the two scripts I have written: Public Sub Test1() Dim lastrow As...
  16. C

    VBA Loop - duplicate header copied over

    I am wanting this code to loop through various files in a folder and copy info from each file and paste to a master file - my issue is that after it opens the first file and moves on to the second one, it will paste the header in there as well. All data starts on the same cells "A5" in all the...
  17. C

    Save and Rename PDF via URL

    Morning Everyone, I have looked all over for a solution, or even one I can cobble together, but it has been too many years, and it seems a lot has changed in terms of the complexity of offered solutions since I last visited! :( I have list of URLs in excel that all have a PDF as an endpoint...
  18. I

    VBA Search Loop If Empty Copy Paste Next Help!!

    I am in VBA H**L right now. Here is what I need the Search Loop to do. In Column A cell "A2" is a changing value depending on the person selected. This is basically a RecordId column. Starring In Column H cell "H2:JZ2" are changing values. These values could be nothing (empty), or contain...
  19. M

    Sum from previous row, different column

    hi all, I was wondering if I could add from a previous row in a different column. from what I have pasted, for example the debit is add and the credit is subtract. in row 12 the credit(column G) would go into H, then the next row would either be debit or credit, whichever one it is would add or...
  20. D

    Addressing column header name in FOR EACH loop

    Hi, this seems a simple question, but just can't crack it. Have used plenty of FOR EACH loop within ListObjects in similar ways as the code below. However now come across a real legacy system with obscene amount of columns, making me want to address columns over header names instead of column...

Watch MrExcel Video

This Week's Hot Topics

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