for and next statements

  1. J

    How to speed up the for - next statement using always the last 200 rows that contains text of a column

    Hi, in order to speed up my attached code, I would like to loop (for - next) only the last 200 rows instead to loop all the ranges AA:AA and L:L. How could I do that? Please, note that the data from Production data.xlsm is increasing every day and the code selects the ranges with an "X" in...
  2. R

    VBA Help: Pull from Sheet1 to Sheet2 under Conditions

    This should be simple....I just can't seem to get it to run right. Goal: Pull in column A from Sheet1 to Sheet 2 (starting at Row 2) where Sheet1 Column BR (70)> 0 AND Column N (14) = Var1/2/3. Issue: Currently it does pull in the correct rows, but it pulls them in at the same row number from...
  3. E

    Need to Export Excel sheet range to Multiple Powerpoint Slides

    Hello Comrades, I am new to Excel VBA so please excuse any misuse of excel terminologies. I used some code I found on a Youtube tutorial video to export from excel to PowerPoint using VBA. The code worked to an extent until I tried to modify it - now I'm stuck. I want to export a range of...
  4. E

    Using VBA in Excel to get values from cell to VBA, so I can load new data to my cube

    Hi everyone We have to read data from Excelfiles to our datawarehouse, and we are using a slicer in Excel to select next file to read to our datawarehouse. Our Slicer is created from a Power pivottable that is connected to our datawarehouse. I have created a macro (Macro3) that is recorded and...
  5. F

    Need VBA code or formula ( Next Largest Value )

    Hi, I need help finding some way out in VBA or just formula .My conditions are : Main column is " D ", if Column J is "Open" then i need next great value from column "C" to column "E" and vise versa .(attached snapshot)
  6. F

    VBA code in 1 line

    How can you place the following VBA code in 1 line. Tried using semi-colon ":" but does not work. Counter = 0 For i = 1 To Len(Item) If IsNumeric(Mid(Item, i, 1)) = True Then Counter = Counter + 1 End If Next i Counter = 0: For i = 1 To Len(Item): If IsNumeric(Mid(Item, i, 1)) = True...
  7. K

    New Input Every Loop

    I have some code that allows a user to select multiple items from a list box and clear them out from the list. I'm trying to add a feature to allow the user to input comments for each entry if desired however the issue that I'm running into is that it will only ask for input once then it exits...
  8. D

    Find and Replace any characters in a list of characters

    Hi, i could really use some help with this. i have this code that checks a column for an illegal character (for sheet name) and replaces it with "_". I want it to check for the fill list of characters that are not allowable sheet names .Pattern = "[\<\>\*\\\/\?|]" Sub...
  9. Ivan Howard

    VBA Loop to change label/text box object properties

    Hi All, Please could someone give me a hand. I'm not sure if this can be done the way I am trying to do it. Basically, I have a userform with 40 labels on it (amongst other objects) and would like to update the BackColor property using a "For... Next" statement - instead of writing 40 lines...
  10. I

    Unable to execute macro

    Hi Guys, I'm having some issues trying to run the macro below. I'm trying to copied the filter data from wbI to the each tab on another workbook (tickets). i seem to have missed out something but i can't figure it out. Much appreciated if someone could shed some light. Thanks! Sub Trial()...
  11. J

    For Loop Over Multiple Ranges

    Hello all, new to the forum but not to the site. Found many an answer or direction to start when dealing with my macros. So thanks for that. Unfortunately my current issue is above my skills and I can't find a forum that helps me find the answer, or I'm just not searching for it properly. I'm...
  12. H

    Basic Variable Problem

    Hi Everyone, First off, a huge thanks to everyone helping out here - I love this community and have learned so much from reading other threads. :) I'm trying to do a very simple for loop that cycles through sheets and executes a long code within that sheet. However, for some reason, the for...
  13. M

    Skipping an i, or multiple i's in a Loop - please help

    I am writing some code to generate multiple pivot tables in excel. My spreadsheet is set up with survey responses to a variety of questions with the question number across the top, and the survey responses below in the column. My problem relates to questions 8, 10, and 13. As you can see in...
  14. N

    VBA -- Populate array with cell references (addresses)

    Hi everyone, Hopefully this is a pretty simple fix, as I'm just beginning to become familiar with arrays in VBA. I'm looking to fill an array with the cell addresses using a For loop. I'm wondering if the problem is occurring because the arrays are by default Variant (?). Thanks for your help...
  15. N

    Need help with looping and find the same day, and month from the loop

    Hi guys, I new to excel and I'm having problem how to program it to my vba.. I have worksheet, that contain column: DATE, PIECES, and CODE THINGS <tbody> <tbody> DATE </tbody> <tbody> PIECES </tbody> <tbody> CODE THINGS </tbody> <tbody> 01/01/2015 </tbody> 7 <tbody>...
  16. A

    Embedded For Loops

    Hello, I am a self-taught VBA writer, and my work is wanting me to do something beyond my knowledge. I have a table that contains Vendor, Platform, Model, Category, and Component. I need to have a list off to the side containing a list of Platforms and Components that can be added to, but the...
  17. M

    On Error GoTo Issue with Worksheet Function

    Hello, I am having issues with the following code in Excel 2010: Dim i As Long Dim NewBottomRow as Double Dim Row as String For i = 1 To NewBottomRow - 1 On Error GoTo Hop Row = Split(ActiveCell(1).Address(1, 0), "$")(1) Selection.Value = WorksheetFunction.Average(Range("A"...
  18. myactiondesign

    VBA Repeat InputBox Entry IF...

    Hi All, I'm really stuck and would appreciate some help if any of you have five minutes to spare - my VBA knowledge is growing, but still limited. I am looking to have a user InputBox to enter sales for 6 weeks, as shown below: --- Sub InputUserData() 'This sub will create six messages boxes...
  19. L

    Moving cells around help needed.

    Hi, I'm trying to make a macro that will make my life easier. What I would like to do is scan through column "A", when the next cell down does not match the previous cell. I would like to move that Cell and the cells next to it to the top of a new un-used column. I created an example of what...
  20. J

    Nested For Next Loop

    Hi, I am new to the vba world and would really appreciate help with this problem. I am basically picking up a security from a sheet through a loop and pasting it on the 2nd sheet. After some minor calculations, I am running another loop on the second sheet looking for "Yes" and pasting 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