if else

  1. G

    If Else Loop macro running slow, anyway to speed it up?

    I've got 2 macros that would run one after another (A4ResetFormulaOnBlankRow, then A5ClearToRight), but the problem is the A4ResetFormulaOnBlankRow macro runs really slowly when I've got 5000+ rows of data. If there isn't many rows of data, there isn't really a problem, but I'm working with lots...
  2. J

    Change values of a sheet based on negative positive values of different sheet

    I have 2 sheets, in sheet1 I have 2 columns Product code and Values, In sheet2 also I have 2 columns Product code and Values, In sheet1 A column a same product may be there for more than one time with different values but in sheet2 the product code is there only for once without having any...
  3. J

    Excel Macro help if Red cell values are there then compensate that value with Black cell values

    I have two sheets, Sheet1 and Sheet2, There are 3 categories in my sheet A category, B category, C category. Under each category there are 5 sub categories and they are 1st year, 2nd year, 3rd year, 4th year, 5th year. In a column for example I have some values and I have the sum of the values...
  4. P

    VBA - When Union is used IF sentence does not work..?

    Hi, Im trying to look at multiple ranges and check each cells with an if sentence in order to replace letters with words e.g. If the cells reads "AR" replace it with "Night"..This works perfectly if I say Range("D10:D40") but not if i say Union(Range("D10:D40"), Range("L10:L40")...
  5. P

    VBA pass string value to textbox

    I have an If ElseIf in VBA and the code runs when I click a button. I have an unbound textbox [text97] that the VBA fills and a textbox [text63] that its default value = [text97]. When running the code, [text97] shows the correct value, but [text63] equals “”. If I comment out all the ElseIf...
  6. S

    If - Else VBA Code Not Working Why?

    I cannot get the macro to work as I want. I cannot get the MsgBox "Check Columns H and AA before Saving and Sending" to come up if No is Selected if I use the code below. Code Showing No MsgBox Sub SavecheckCL() ' ' SavecheckCL Macro ' ActiveWorkbook.Save Dim AnswerCL As...
  7. P

    Flaten values and keep low to high of other cells

    If in a workbook I have a column of importance, in this case Animal. I have multiple Cats. I do not need all the Cat rows, I just need one with the lowest Start and the highest end. So, in this case my result would give me one row with Cat like so. I want to do this for all of the Animals in...
  8. W

    Nested IF AND statement

    Hello! It's my first time here and I'm looking for help. I have this formula: =IF(and(J8<$X$8, J8>=$W$8, $Y$8, IF(AND(J8<$X$9, J8>=$W$9, $Y$9, IF(AND(J8<$X$10, J8>=$W$10, $Y$10, IF(AND(J8<$X$11, J8>=$W$11, $Y$11, IF(AND(J8<$X$12, J8>=$W$12, $Y$12, IF(AND(J8<$X$13, J8>=$W$13, $Y$13...
  9. D

    If condition else do nothing

    Hey everyone, I trying to figure out a formula for vba, where it checks to see if the the second row is blank. basically if row 2 is blank, do nothing else, carry out program. Writing a monthly report, so some months there's no data in the table, and just want to make sure it doesnt carry...
  10. D

    if else function

    Hi guys, not too good with if else loops and was looking for a little help. Im trying to run a macro where it checks if the cell below the current one is empty. If so, then delete everything from below that cell. otherwise do nothing If ActiveCell.Value <> "" Then...
  11. C

    If Else to change cell color

    Please see the attached photo of the spreadsheet. Here's what I'd like to happen: When I click on the button "Add Row," I would like it to create a new row in row 17 between columns A and V (A17:V17). I need columns A-C (A17:C17) to be Merged and the text Left Aligned, and then the text...
  12. D

    Formatting macro to loop through all worksheets

    Hello, My goal is to run two sets of code that will format all of the sheets in my workbook in one of two ways. All the sheets are either formatted in style "A" or in style "B". One way to identify which type of style I am working with is to run the following: If IsEmpty(Range("K3").Value) =...
  13. D

    Looping IF/ELSE through all worksheets

    Hello, I am trying to run a loop through all of the worksheets in my workbook. I have around 100 sheets in the workbook, but they are each are formatted one of only two ways. For test purposes only, I have the macro putting either a "1" or a "2" in cell A1 depending on which type of sheet it is...
  14. R

    If-else statements for multiple columns

    Hi, Need a formula for showing value of a cell as follows: if cell value = value in cell a1, then show value in cell b1, else if cell value = value in cell a2, then show value in cell b2, else if cell value = value in cell a3, then show value in cell b3 and so on. <tbody> Value (input) A B...
  15. D

    VBA: If workbook is open code

    Hello, I am looking for code that will check to see if a particular workbook is open (named "The Sheet"). -If it is open, then I would want to go to this workbook. -If it is not open, I would like to open it Any Ideas? Thanks!
  16. J

    VBA splitting column to a second file

    Hi all, I'm new to VBA and i'm really stuck. Any help is much appreciated. I'm trying to compare two columns in 2 separate files and split one of them into two files. "Trained" is a worksheet of all those trained in a procedure (both historical and currently employed). "Employed" is a worksheet...
  17. A

    multiple if condition

    Hi all, I'm formulating a formula like this: IF (BI2="Run") then IF(L2<=1;"X-Small") IF(L2<=3;"Small") IF(L2<=10;"Medium") IF(L2<=20;"Large") ELSE "X-Large" Can you please help me use this into right excel formula. Thanks in advance. Any help is appreciated.
  18. N

    Networkdays, IF else

    Hi There, I need a bit of direction. I've 3 criteria ( Stage1,2,3) and based on each criteria I need to calculate networkdays, Which isn't too difficult and I managed. What I need is if its stage1 the difference betwen dates if less then 10 then pass else fail. In stage 2 the diifference is 20...
  19. N

    If else with criteria

    Hi There, I'm stuck with a simple if else query and need a bit of guidance. what I'm trying to do is compare 2 dates based on the condtion from different cell and if condition gets statisfy put pass else put fail.. Can you please guide me? I know its not that difficult i just need a bit of...
  20. E

    Export and import script

    Hello all mrexcel members, If you look at my picture below it’s excel There are first subtitles on the first row, and different columns: “c++ object” and “translate this column”, then language combinations in different columns. The thing is, with the column “c++ object” and “translation...

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