if then

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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"...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. B

    How to put into Categories?

    Good afternoon all I am having trouble putting categories together. I need a formula to do the following. In cell A (Formula) I need it to tell me which user belongs to the category present in cell C (Category). Cell B (user) is showing which users have which categories assigned to them. If a...
  18. H

    Adding Cells from two sheets together, need the total to equal zero if one of the cells equals zero.

    I have three sheets a budget, actuals , and then a performance sheet (the difference between what we budgeted and what we spent). Each are divided by months and expenses. The equation is =SUM(Budget:Actuals!B6). I want to make it so cells in the performance sheet don't populate if there is a...
  19. H

    IF statement

    I'm struggling to figure out a formula that returns the desired value each time. Basically what I'm trying to create is a formula saying that IF A3 = 1 THEN return the value from B3 into cell C3. I'm having difficulties because its not a nested statement or a true/false. is this possible? Thanks.
  20. K

    Form Checkbox Automatically Ticks when the color of another cell changes to Green

    Hi! I was hoping someone could help me figure out how to get a form checkbox (open to using ActiveX as well if easier) to automatically tick once the color of another cell changes. So if the color of A1 becomes green (and I can indicate what green exactly or if possible within a range would also...

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