for each cell in range

  1. Y

    Creating a For Each Cell loop inside another For Each Cell Loop to repeat code on different files which are listed in sheet

    I am trying to create a For Each Cell loop, inside another For Each Cell Loop. I have not been able to find answers for this anywhere, is this even possible? The outside loop is supposed to Pull data from different files which are listed in Data sheet, cells Z2 to Z4, I then want the inside for...
  2. J

    loop through each cell in range not looping through whole range

    My code is supposed to create a new sheet for each entry that is marked in a list of task codes. This is how it is supposed to function. In my workbook I have a list of task codes. For each task code I've left a space for the user to indicate which task codes the user wants to create a sheet...
  3. S

    VBA - If statement - Range

    Hi, This is my previous thread which got resolved: "I'm trying to use the Textjoin function in VBA. I know how to do it for the first row, but I'm having issues when I want it to apply for the whole column. For example, I want it to start at AH2 and the formula on the cell should be...
  4. S

    VBA - Textjoin for the whole column

    Hi, I'm trying to use the Textjoin function in VBA. I know how to do it for the first row, but I'm having issues when I want it to apply for the whole column. For example, I want it to start at AH2 and the formula on the cell should be =TEXTJOIN("-",TRUE,I2,AE2,AF2,AG2). For AH3 the formula...
  5. A

    Nested For Each Loops -for each ws... for each cell... failing to loop worksheets

    Hello all! I've looked through pages and pages of searches here and across the web, and I'm back with no luck. Hoping someone will see something that I should be seeing. I am trying to perform nested loops and the outer loop (worksheets) isn't looping from ws to ws. When the macro is run, the...
  6. M

    VBA - Need help formatting a row range based on string or format in column A

    I have the code below that works. It searches column A looking for "00" as the left most characters and then formats that cell with white text and black interior. Dim cel As Range For Each cel In Range("A6:A300") If Left(cel.Value, 2) = "00" Then cel.Font.Color = vbWhite cel.Interior.Color =...
  7. B

    Within a For Each Loop, How can I Cut and Paste an Entire Row using Range and a variable for the cell address?

    Within a For Each loop - code below, I loop down Column V of a dimmed worksheet "wsr", so I assigned "v" as the range variable within Column V, so in essence it is a "For each v in ColV" situation. When a certain set of conditions is met for a given "v", I want to cut-and-paste the entire row...
  8. R

    Open & Paste in Different files

    Hello everyone. I created a code that allows me to replicate the weekly information written in one file on multiple others. I update the information the information in the master file, and then it opens the correct file for each customer, pastes, saves and goes on to the next customer. It is...
  9. K

    VBA For Each, Then

    I am trying to get my code to look at each workbook and if there is a value in the set range to copy data in various cells depending on where the value of data is. I need the Data to go to a summary sheet (already created), but I am getting stuck on how to tell VBA to look at column C in the row...
  10. 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...
  11. G

    How to concatenate 2 cells for each cell in a range

    I have a worksheet with data in it from Cols A-U and a variable number of rows. In col V I want to concatenate the data in cells A and E for every row that there is data. So far I have set a range that is all the cells in col V that I want to concatenate A and E for but I'm not sure how to...
  12. O

    Check if a value is positive or negative VBA

    Hello everyone, I have been trying to write some VBA code to check if a cell contains a positive, or negative percentage. Based on whether it is positive, or negative I would then like to copy and paste the value into a new table on a separate sheet which has two tables. One containing all the...
  13. C

    for each cell in range

    Hi guys, I'd like to ask help regarding the below code: 1. why the below code runs infenitly? 2.Could somebody help me how to do the below ones without the temp string? I mean to use something like if cell.find("backup") is ..... then dim temp as string For Each cell In Range("I37:I40").Cells...
  14. T

    Create a formatted list/sheet from 2 other sheets

    Hi, I tried searching for this even though it seems pretty easy, but it is quite tricky to describe and couldn't find anything.. I need to create a formatted excel from 2 sheets, one with data (DataSheet) and second with settings (SettingsSheet). The Macro needs to loop per row into the...
  15. T

    How to Update cells with the difference between cells in that column and another column

    I am trying to manage a list of inventory items using Excel 2016. I have three end products, each with its own Bill of Materials, and I have the relevant information all on one worksheet (Inventory Part, current inventory quantity, and quantity of said part in each of the 3 BOMs). Say I am...
  16. L

    VBA if cell in range contains a certain value (a string) how do you to take the value next to it and store as a string?

    Set rngAttributes = wsNBA.Range("J63").CurrentRegion Set rngYup = wsNBA.Range("J63:J75") Do Until rngAttributes.Cells(RowIndex:=intrRow, columnIndex:=1).Value = strTeamName _ Or rngAttributes.Cells(RowIndex:=intrRow, columnIndex:=10).Value = "" intRow = intRow + 1 Loop If...
  17. Fishboy

    Curious "For Each Cell in Range" issue

    Hi all, I have been trying to get my around around a strange issue I have been having with some of my macros. I was very pleased with myself recently when I got to grips with "For Each Cell in Range" VBA however I have started noticing that sometimes these don't work as expected. For example...

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