for each

  1. A

    Looping through sheets excluding sheet name isn't working

    Hello, I have the code below which is supposed to loop through all sheets in the workbook except for the one labeled CONSOLIDATED DATA or (Sheet1). It then does a reverse find on column A looking in reverse order for labels that form a table towards the bottom of the data. Once it finds the...
  2. L

    Insert row & format on specific value, then repeat w/ new value

    Hello I am trying to add an entire row to a worksheet based upon a specific cell value = "knowledge Base", then format the inserted row. The worksheet has multiple cells with the value "Knowledge Base", but I wish to insert to new row above. I would then like to add a separate row based upon...
  3. T

    For Each Issues

    Hello, I am having a few issues with a for each macro I am working on. I am trying to compile information from forms in multiple worksheets into one list. The information I need is in the same cells on all the forms and I have recorded the macro I need from one of the sheets and I am trying...
  4. S

    Single formula to get sum of specific values for each cell in column based on criteria

    Sorry if the title is a bit obtuse...little hard to explain. I'm trying to come up with a single sum formula that evaluates each cell in a column and adds a specific value to the sum based on the contents of that cell and two other cells in the same row. Here's an example table: <tbody>...
  5. S

    VBA how to stop a For Each loop

    I dont really know what I am doing with VBA, however, I have managed to get something ALMOST working that I want to do! Basically, I have a worksheet that has a list of gameboy games on the left hand side, and I have managed to fudge togther a macro to grab “A PRICE” from ebay, it uses the...
  6. R

    Is it possible to have 42 ranges in an array to loop through them with (for each cell in ...)

    Sub CALC2_() Dim R As Range Dim Rng As Range Set Rng =...
  7. kpasa

    Cycle Trough Table move contents to adjacent cells

    For sake of example, I have a table like this: NameCheckPoint 1CheckPoint 2CheckPoint 3Ricky Bobby Text #2Text #1Joey Text #2Text #1Matt Thomas Text #2Text #1 I need to cycle through each row and if there are contents in CheckPoint 2 column, run a macro I have already set up and then move...
  8. K

    How to read the indices from each element of array?

    I am reading through the elements of an array with a For Each each loop, but how do I read the coordinates of each element in turn as called, for example: For Each Element in MyArray x = (first coordinate/index number of Element) y = (second coordinate/index number of Element) Next...
  9. J

    VBA, Match, Date, XLCutcopy, check if Exists, For Each c in range etc.

    Hi guys, I really need your help with my project, because i am stuck.. first, here is the link to my example file: https://www.dropbox.com/s/9vkh8y5w30le6r2/Map1.xlsx?dl=0 What i want to accomplish is. (just write it down what is logical for me tho:smile:) 1st issue: with...
  10. K

    "For Each" Loop - Skipping Rows

    Hello, I have a for each loop that is pulling email addresses to set as recipients of emails. Thing is, it pulls emails "for each" clientCode - some clientCodes have multiple email addresses and thus have multiple rows. These emails need to have all email addresses as recipients and right now...
  11. L

    For Loop within For Loop - Modifying Bar Chart Data Selection Range

    Hello guys first post here, So, I have a list of automotive parts, their start of production, and the capacity of the line like this: Current Part W Part X Part Y Part Z July, 2016 August, 2016...
  12. G

    Macro Excel :using Range in a FOR loop with IF statement

    The table is <tbody> SEQ acc bsb 1 123 4567 bas 456 789 2 123 4567 3 147 78999 </tbody> Below is the code Private Sub CommandButton1_Click() Dim InitialRow As Integer InitialRow = 2 Set BaseSheet = ThisWorkbook.Sheets("sheet2") FinalRow = BaseSheet.Cells(BaseSheet.Rows.Count...
  13. G

    Excel Macro Just need to go next ROW if the value is not Numeric.

    This code has some syntax error but its generic I cant understand. Says For with no Next I have got an next in code it as I am new at this how can I Skip to next row if the row does not contain a number? For Each Nextcell In Range(InitialRow) If Not IsNumeric(Nextcell) Then...
  14. M

    Lookup on two indexes in two tables.

    Hello. I am populating table via OBDC connection. I one table there is only ID. (see picture) [image code removed] On second table, there is ID and a name of a person. (see picture) [image code removed] how would I get coresponding value in a "Naziv" in first table. Note: range is...
  15. E

    nesting if and for to loops

    I'm having trouble nesting loops! How do I nest an "if statement" into a "for to" statement? Can anyone point me to a good place to check my nesting loops? I'm essentially trying to populate a master list of numbers (z,1) by using matching criteria between two other lists. If two cells of...
  16. C

    Find first empty cell to Left within a range

    Hopefully the thread title isn't misleading for what I'm trying to do. I have code that defines a range based on a value from another sheet; then duplicates that range, plus the cells to the left of that range, onto another sheet. So far, so good. The problem is that now I need to look for...
  17. J

    Trying to dect formulas and copy values three columns over

    Sub Move3month() Dim WS As Worksheet Dim Rng As Range Dim Cel As Range Dim isformula As Variant 'not sure which type to use so I just have variant for now isformula = Cel.HasFormula Set Rng = ActiveSheet.Range(c9, c200) For Each WS In ThisWorkbook.Worksheets 'Below I want to check if the...
  18. P

    Is 'For Each' and 'For i = 1 to n' work in different ways?

    Data: C1: 3 B2: 2 D2: 2 A3: 1 E3: 1 B4: 2 D4: 2 c3: 3 Sub mac() 'MsgBox Selection.Cells.Count For Each cell In Selection.Cells MsgBox cell.Address Next cell End Sub Sub mac1() 'MsgBox Selection.Cells.Count For i = 1 To Selection.Cells.Count MsgBox Selection.Cells(i).Address Next i End Sub
  19. S

    MsgBox stuck in loop when searching for cell color [For Each / If Then] loop

    I am aiming to select a column and highlight any duplicate values as green. I would then like to instruct Excel to do 1 of 2 things in an If Then structure for the given range: 1) filter for any potential green cells and then end sub with "Complete" msgbox OR 2) if no cells were highlighted...
  20. T

    non-continuous range not working

    Good afternoon guys, I am working with a nested for each loop to insert data from one workbook to another. It seems that it's stuck to the first value in the non-continuous range. In the Pineapple workbook range A14 is Banana and range A21 is Apple and it never skips to apple. Can someone...

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