if statement loop

  1. H

    Match all values within a filtered range based on multiple criteria

    Hello All, I've started playing with VBA some days ago, thus I'm new with Excel coding. Below is a simplified version of the sheet I want to extrapolate the data from (sheet name "Data"): <tbody> Customer Platform Program Motor Type A 1 pr1 aa A 1 pr2 aa A 1 pr3 aa A 1 pr4 cc A 1...
  2. J

    If Statement - If false, then check next cell

    I'm creating a function that needs to find if a name in one cell (E3) matches a name in a list of cells. I have two formulas I've tried to use but neither is quite right. Formula 1 could work, but it'll take forever to write all of the nested if statements (and it would be difficult to add new...
  3. J

    IF statement VBA, (If cell A empty replace with cell B)

    Hi all, I'm looking for what I presume is an If statement where I have two columns formed from another macro. These columns contain dates, but quite often one of the columns will be empty and the other will have a date. I'm looking to merge the two columns into one and have thought the easiest...
  4. T

    If statement inside of Do While Loop

    I am trying to perform a loop through a file folder and pull all of the file names and paste them in my range EXCEPT I want it to skip all files that have Zero Reading in the name. Any help? In my code below I cannot get the If statement to skip all file names containing "Zero Reading" in the...
  5. E

    Excel VBA: Loop within Loop to copy from one sheet & paste into another using IF statement

    Hi Excel/VBA Superusers! Hoping someone out there might be able to help me. I've been trawling through the forums hoping to find some help on how to write my VBA code (i've not written code for over a year :confused:) but have had no luck finding anything that resembles what I'm trying to do...
  6. N

    IF, ELSEIF Loop Not working. PLEASE HELP!

    Hello, I am attempting a loop vlookup with an IF statement. The Vlookup is matching loans # (in i,4) from the active sheet to the lookup sheet "CADM" to return the "Commitment Amounts" to the active sheet cell (i,5) and down. I have the Vlookup working just fine. The problem is when I want to...
  7. B

    Nested If-Elseif-Else loop involving dates in VBA

    Please help me write this code. Thanks!! Ask the user to enter date. If the user enters date between January – May Display: “Online Class Only!” If the user enters date between June – July Display: “No class available!” If the user enters date between August – November Display: “Two...
  8. L

    Macro to call macro if cell = 0. Please help. Wife's job depends on it.

    I have a macro button named "AddLine" that shifts cells down from E thru (End Right) as long as I start in column E. I want to test each line and if A = 0, run the macro "AddLine", if not then move down a line and repeat. I tried the following but it only inserts from the first row (which...
  9. L

    macro to check cell a, if =0 go to cell e, then run macro

    If cell A in row 1 equals 0 I need to run a macro from column E "AddLine" (which shifts cells from e thru end-right, down) If its not equal to 0 I need to continue to run it. This is what I have but it only inserts a whole row in row a1 then stops Sub MyInsertMacro() Dim myLastRow As...
  10. F

    checking value in list

    Hi, I have two list. I need to check if value from one list is existing in second list. If not existing I should add on the end of the list the value. If exist I should in column B add "YES". Function X() Dim ws1 As Worksheet Dim ws2 As Worksheet Set ws1 =...
  11. K

    If statement in VBA

    Hi, I want to copy data in Column C if there is a "*" in column B on the same row. Then I want to paste it in the next available row in column C (or even starting at C700, then the next available). If there isn't a "*" then it should look at the next cell in the range. I have two variations...
  12. J

    Restart a Loop from within an If statement?

    How to Restart Loop from begining when If statement is true? I am running a macro using a list of values in column A and using For and Next i to restart and loop through my data until the end of the list of data is reached.During the loop, I have If statements researching each value and if it...

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