if then

  1. C

    Move on if not found

    Keep in mind I'm self taught so please excuse any ignorance of mine. Background: Daily, I receive a report that consists of 20-25 text files, 1 for each state we have business in. I have a process that consists of a few different scripts run one after the other. It does a lot to the files...
  2. L

    If Then Function Error VBA

    Hi, I have this code and it shows me "Object doesn't support this property or method" I dont know if anybody knows waht might be the mistake! Sub Horror() Call LastRowPivotTable With ThisWorkbook Set wb = ThisWorkbook Set DR = wb.Sheets("Draft") Set PT = wb.Sheets("Pivot Table I") MasterAcct...
  3. L

    If Then VBA searching on Pivot Table

    I have this code but sometimes it may search for a data is not, so I want a IF THEN formula maybe if it doesnt found anything it can still work, or maybe IFERROR Sub PivotTableFilter() Dim MasterAcc As Variant MasterAcc = Workbooks(Wk_Name).Worksheets("Draft").Range("C4").Value With...
  4. L

    If Then Function in VBA Loop

    Hello! I have the next code and is working but i would like to make it a loop, for every single cell there is with information. Sub Internet() If Sheets("Draft").Range("G7").Value2 = "INT1" Then Sheets("U-Detail").Range("R11").Value2 = Range("'GL Accounts'!B1").Value2 &...
  5. D

    VBA to enter a formula into a specific cell and fill down: in every worksheet but one.

    Hi Folks, I have 5 worksheets, 4 of which---Sheet 1, 2, 3, and 4 contain tables. The fifth worksheet is called "MACRO" and I'm using it for a user interface, so I need to avoid running the macro in this worksheet. What I want to do is put a formula into cell AF16 of worksheets 1 to 4, and...
  6. K

    If/Then Problem for Time cards

    Hello Excel Geniuses! I am in need of some help to get the brain juices flowing on this Monday morning. Here's the scoop: I have created a time card calculator to calculate total time worked and distribute it to regular and overtime hours. Currently I have it set to calculate if over 8 hours...
  7. M

    If / Then with multiple variables

    I use the code below to match a single value in Cell B1 and populate the corresponding info through out the spreadsheet. Instead of a single value in cell B1 I'd there to be multiple values in cell B1 so I can combine multiple reports together. Currently the value in Cell B1 is something...
  8. A

    I'm creating HTML code with my excel spreadsheet

    I've been working on using my excel skills to create HTML Code using the concatenate formula. So far, everything is going according to my plans. My question: I have 3 worksheets in a workbook. A. Data B. Calculations C. HTML Code In spreadsheet C, I would like to do a calculation that says...
  9. V

    VBA If Then Function Needs to Peform Two Functions If True

    My current code is: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 6 And Target.Row = 7 Then If Target.Value = "Loan $" Then Target.Offset(2, 0).Formula = "=F14/F8": Target.Offset(2, 0).Interior.Color = RGB(217, 217, 217) If Target.Value = "Loan to Cost" Then...
  10. Vincent Thank You

    Filling down cells with formula, sometiomes their is no data.

    Hello! After filtering for 2017 data in column C the following formula: With ActiveSheet.Range("N2:N" & Cells(Rows.Count, 2).End(xlUp).Row).SpecialCells(xlCellTypeVisible) .Cells.FormulaR1C1 = "=IfError((RC[-2]),0)" .Cells.FillDown Worksheets("2016").Columns(10).Calculate End With...
  11. A

    Checkbox event help

    I am using the status of a checkbox to change the color of a rectangular box behind a field for quick status reference. Private Sub Permit_Received_Click() If Me.Permit_Received = Yes Then Me.PermitHighlight.BackColor = vbRed Else Me.PermitHighlight.BackColor = vbGreen End If End Sub First...
  12. M

    Formula to check various criteria based on common value in row

    I either couldn't properly describe this to google, or wasn't looking the right way.. Basically, I'm looking for a formula, that for the given info below, will check in this type of way: For all of the same "ID Number", are all "Dates" the same, are all "Dates2" the same, are all the "Number"...
  13. S

    Fairly unique copy/paste IF question for VBA

    Excel Superheros, I have a conundrum and need a hero. I am trying to create a VBA code that 1) detects the first empty cell in a row then 2) reads the value of the cell several rows down (Apple price score cell), 3) copies the value of a cell on a different row (price cell) and pastes it the...
  14. B

    Account for weekends in a =IF formula

    Team, Working on a spread sheet that is calculating the expected return date by number of pages and date turned in. Current formula: =IF(I3<=0,"",IF(I3=5,"2"+B3,IF(I3<50,"3"+B3,IF(I3>=50,"14"+B3)))) Formula breakdown IF(I3<=0 (Zero pages to keep the "FALSE" from appearing) IF(I3=5 (5...
  15. B

    If then statement--highlight and/or delete record

    I have the following data set: <tbody> UniqueID R0A1 Animal_ID TSB 6 1 1 526 6 0 1 526 6 0 1 526 6 0 1 526 6 0 1 526 6 0 1 526 7 1 1 462 7 0 1 NA 7 0 1 462 7 0 1 462 7 0 1 462 7 0 1 462 8 1 1 NA 8 0 1 NA 8 0 1 NA 8 0 1 NA 8 0 1 NA 8 0 1 NA </tbody> I...
  16. R

    A bug in the delete function - i need to click twice to delete the row left

    Sub DeleteSettleHKDDebitAccount() Dim checkrow As Long, lastrow As Long With Worksheets lastrow = Worksheets("借出-港幣").Cells(Rows.Count, "A").End(xlUp).Row For checkrow = 3 To lastrow If Worksheets("借出-港幣").Cells(checkrow, "F") <> "" Then...
  17. J

    If then statement

    Can someone write the If then function for this below. Let's say the cell I am referring to is C3 If cell equals 120-180 then 3 If cell equals 100-119 or 181-220 then 2 If cell equals 80-99 or 221-300 then 1 If cell <80 or >300 then 0 I've tried embedded If statements and just can't get it to...
  18. C

    Userform which presents Calculation answers in MsgBox

    Hi all Relative newb here, so might be a daft question. I have created a basic Userform which asks for 3 dimensions from a user, on clicking the OK button the idea is that a MsgBox delivers the required information which is derived from a few calculations. See my code so far below: Private Sub...
  19. H

    Having trouble with if then statement

    Hi All, I am trying to do the following: in my workbook H34 (It is actually H,I,J as those three fields are merged) is H12 (H,I,J) * 100 I need to write a formula so that if H34 is less thqn $2500 it will multiply the number of locations (H12 x $100), but if H34 is $2500 or more it will enter...
  20. S

    IF/Then statement for worksheet.

    Hoping someone can help me with this problem I have. I need to have an excel sheet search for a set of numbers in a specific tab. Then if it finds that number, then place the word used or highlight it in some way. So there are tag numbers that are put in a sheet. There are 12 sheets named from...

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