for each next

  1. S

    Curious: One works, the other doesn't ---- why????

    I have a workbook with multiple sheets. I have some simple code that I thought would work, but for some reason it doesn't. Here is the code in a module: Sub GoHome() Dim wb As Workbook Dim ws As Worksheet Set wb = ThisWorkbook For Each ws In wb.Worksheets ws.Range("A1").Select Next...
  2. R

    SendKeys to force enter a cell to update format - starts printing instead

    Hi All, I have come upon an issue regarding the SendKeys feature in VBA. i have used this before with succes but for some reason i cannot figure out whats the problem. I want the code below to enter each cell within a range by sending the keys F2 and ENTER. It will not work... It keeps...
  3. D

    Read row one by one

    hello everyone i have created a vba code to send email via outlook now i have to do one thing it is to read the first row and next and next , for example in A2 ,A3....... so on there are list of email recipient to be added to the field (TO of Outlook) and B2,B3... C1,C2.... so on there are text...
  4. S

    VBA on For Each over multiple Worksheets

    Sorry if this is an obvious question, I'm new to VBA but I learn by doing and I'm trying to use this code and it's not working for me... Basically I have a workbook that has 175 sheets on it. Each sheet has data in column A (UPC codes) and I want to put the number 1 in column B next to every...
  5. B

    How to loop a Vlookup macro for each value in a column

    Hi Everyone, So I have code that successfully vlookups ONE specific cell, in a column of "Lookup Values". Private Sub CommandButton4_Click() LookupVal = Sheets("Sheet1").Range("B16").Value Range("A5").Formula = "=VLOOKUP(" & LookupVal & ",Sheet2!" &...
  6. B

    Vlookups in VBA using a current region

    Hi all, I am looking for a general theory as to go about using Vlookups with "CurrentRegion" arrays. This is because the lookup table is never strictly defined. That is, 1) The actual lookup table will be the current region of .. say "A37". 2) Have the col_index_number value refer to a...
  7. G

    Copy/combine data from multiple workbooks

    Hello, I have multiple workbooks that I need to combine into one main master workbook. I have a macro already in place that opens/closes all the workbooks, I just need help looping through each open workbook and placing the data into my master sheet. See my progress below so far: My main...
  8. myactiondesign

    User Exit Through Cancel or Close in FOR/DO LOOP

    Hi all, I've got a fully functioning macro that cycles through a range of cells and inserts user input sales data into each cell, one-by-one. The problem is that you cannot cancel or exit. Sub FirstSalesInput() 'This sub will create six messages boxes for user input 'The user input will be...
  9. 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...
  10. A

    Can this For Each Next loop be restructured to make the execution faster

    Hi everyone, Below is a portion of code from a sub from a large worksheet table (~75000 rows A:BB columns). I currently select a range manually, then run the sub. For Each cell In rng cell.Formula = "=concatif([Material Number],[@[Material...

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