if statement not working

  1. M

    If formula reference changes when column order is changed, but shouldn't

    Hi I've got an IF statement that i) checks if the value of a cell in another sheet is blank - if it is, then it returns nothing ii) returns the value of that cell if it is not blank. =IF('Tab1'!$S5="","",'Tab1'!$S5) However, the formula keeps changing every time a macro, which...
  2. J

    Userform: If Statements are not working correctly

    Hello, I'm new here AND new to writing code, so I'm not even sure how to word my question, but I'm stuck and need help. I have a large database and userform. Data which includes (but not limited to) 1. Quickbooks file name = Txt_QB_File_Name 2. Full Name = FullName (as variable)...
  3. B

    Vba if statement help

    Hi Guys, I have a macro that enters the application username as per below. but one of the users names comes up with a dash and I am trying to say that if the username comes up with the dash then replace it with the name in the statement. but it keeps coming up with an error. can anyone help...
  4. C

    run-time error 91 on Msg Box Code

    Hi all. I hope you can help I have a piece of code that is producing a run time error 91 I am trying to get a MsgBox to tell me if there is a sheet in my workbook called "In Progress" or else that is not in my workbook but it is creating an error on this line If worksheet.sheet.name = "In...
  5. L

    VBA: IF 0 < 1 returning false

    So here is my problem section of code (I have added the msgbox as a test line) It is within a much larger with statement for the worksheet. For Each part In Range("Level").Cells If "0" < 1 Then MsgBox part.Value & " " & .Cells(part.Row + 1, part.Column).Value If part.value <...
  6. S

    IF AND OR statement

    Hi, I have been working on this formula for hours and cannot get it right. Please help! Column C has either TRUE or FALSE. Columns L and M have either a number or #N/A (depending on whether there was a number on the source data - this data has come from a vlookup). What I want, in column N...
  7. A

    "If" Statement Not Running Even When Statement is True

    Hello all, I never thought I would have so much trouble trying to do simple user error checking. I have a little block of code that asks for a user input, and then it checks to see if the input is valid (numeric and between 1 and 7). The if statement runs when the entry is not numeric, but if...
  8. P

    Stuck on pesky If Statement that's ignoring my criteria, need help

    Hello, I'm analyzing data. I want the code to analyze everything from the last row up so long as the date equals the preset date. If the date doesn't equal the preset date, I want the loop to exit. The loop is not exiting for me. Here's my code: Sub PrintItems() Dim r As Long Dim...

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