if statement

  1. A

    If statement not working

    I am working with arrays now and the IF statement is judging wrong. I resumed my code: Sub Reset() Nr=6 Dim X, Y, MinX, AM, NX, W As Double Y=200,00 AM=5,00 ReDim X(Nr) ReDim Z(Nr) For i = 1 To NrParcelas X(i - 1) = Y - WorksheetFunction.Sum(.Range(.Cells(2, LTi.Column + i - 1)...
  2. distiDoestoe

    If statement if cell is between 2 rows? [Beginner]

    Hi, I'm very new to VBA and I want to make an if statement is the selected cell is between two rows (between 6, 10 as an example). Only I can't figure it out, I'm used to more different types of programming languages (Python, PHP, JavaScript) and with those I never really had issues but VBA I...
  3. J

    How to create a dynamic rolling count by year column

    Hi, I am trying to do a few things based on the below sheet. Essentially I have a long sheet of dates broken down by year ,month ,day hour...etc. I aim to have a rolling count of the total number of rows for each year. So column "percentcounter is an example of what I would expect to see. It...
  4. frank265

    Quick Formula to Calculate Time

    Hi all, Hoping someone can help with a simple IF calculation... I wanted a quick formula to calculate the time spent on a task but for the calculation only to be made if the cellls are not blank. Example below Start Time End Time Total Time 08:00 12:00 04:00 NOTHING WRITTEN HERE...
  5. TheMacroNoob

    List of values based on matching criteria in another column

    Hello excel experts, I want to grab a list of unit numbers based on criteria in another column. If a row in column G contains "Tax Credit", return the corresponding row value in column B. There is a formula that accomplishes this task: =INDEX(Sheet1!$B$8:$B$86,SMALL(IF("Tax...
  6. C

    Dynamic IF/VLookup Formula Help

    Hello All, I have an existing IF Statement (shown below) in Col P of the "Book Average Balance" sheet which has many conditions that will pull (sign reversed) data from Col K if all are met. That old formula does work, however it is not dynamic to update. If there are new accounts that are...
  7. M

    What am I doing wrong?

    Getting a mismatch error Sub City() 'This Sub is going to look at Column "C" which contains both County and City Names, if the cell 'contains a City name then it will move it to Column "B" Dim Lastrow As Long, n As Long Dim City As Variant Lastrow =...
  8. G

    Drop-Down and IF Statement Data Validation in one cell

    Hi everyone, Here's my problem. The objective is for people to only be able to touch a cell if a condition is met and they have to select from a list. Example: people using this excel will only be able to write in cell C2 and choose from a drop-down if B2 = "lalala". I thought about doing it...
  9. W

    Using if and ifblank

    Hi Everyone, I've been trying a number of different combinations but nothing is working so far. I am trying to do a formula that if a cell is blank then to do a sum. The "sum" part works fine: =IF(G3>3,"yes","no") but what I can't do if for it to only perform the sum where the cell is blank...
  10. O

    VBA Array not working - cannot write to array and read is too slow

    Hello I am writing a code to write this code to populate an array based on an If statement and then unload that array into a range. Here is a sample of my code Sub UpdateFromPCT() Dim wkb As Workbook Dim ws As Worksheet Dim pct As Workbook Dim pctST As Worksheet Dim i As Long Dim holdAry()...
  11. K

    If cell has value

    I am in need of a code if Column K has value to insert next value into column N, if column N has a value to insert next value into column Q and so on. Please help!!
  12. E

    Multipe If Statements

    So What I need in Y is if W is over .1400 to say HA, if W is between .1150 and .1399 to say H, if W is 0 and X is greater then .045 to read G, and not to put nothing or NA if none of the conditions are met. Thank You In advance.
  13. A

    IF formula based on a bolded cell

    Hi, Is there a formula I can write to have an IF statement based on the fact that a cell is bold? For example, I'm trying to calculate the variance between two numbers only if the cell is not bold. I'm working with comparative year financial data (balance sheet/ income statement), which show a...
  14. N

    Needing help with a complicated Ifs/and/search please

    I have a field of data which needs to be compared in multiple places, I keep almost getting there but am missing the final bit to make it work, would appreciate any assistance with this! One table of data has an individually coded number which needs to be searched for in the other table of...
  15. D

    VLookup with IF formula reference another worksheet

    Hello, I am having trouble trying to come up with logic to make this happen. So i have an idea of using a vlookup where im thinking of the vlookup looking partially like this but all in one =VLOOKUP(D7,'List'!$G:$Z,19,FALSE) =VLOOKUP(D7,'List'!$G:$Z,20,FALSE) the IF part id like to add is that...
  16. Z

    Calculate Tenure Categories

    Hi, I need to calculate the tenure categories based on category table in my sample data below. Anyone could suggest a formula? ABCDEFGHIJKL1Hire DateTermination DateTenure CategoryTenure Category27/18/20173/31/2022< 2 Months35/13/20193/25/2022< 6 Months42/1/20213/24/2022< 1...
  17. R

    Combine information and transpose information?

    Hello, I need to find a way to take an excel sheet that has employee names listed several times in Column A and then it has several earnings codes in column b with earnings amount in Column D with different data and find a way to combine all the data also in the other rows together so I don't...
  18. J

    If statement on range

    Hi, I am trying to work out how to write an IF statement/ formula that looks at 2 cells in Sheet A of my workbook and displays the value of the cell that has text in it (one of the 2 cells will always be 0) in Sheet B of my workbook. I'm struggling to work out how to do it... any advice please? TIA
  19. D

    Excel formula, if and or

    Hello, i was trying to see how to add an extra statment to this if statement, =IF(OR(COUNTIF(D20:R37,"<>"&"")>61,COUNTIF(D40:D42,"<>"&"")>0,COUNTIF(D45:D59,"<>"&"")>0,COUNTIF(D62:D76,"<>"&"")>0),"X","") the additional statement i want is that if a cell B33 on sheet "List" is equal to "First"...
  20. Jyggalag

    Conditional formatting for blank cells containing formulas?

    Hi all, I currently have this setup: I have a row of formulas saying IF(ISBLANK(cell below),return blank value, otherwise return value to the left + 7) to advance the week one week ahead when data is entered. I want to create a conditional formatting for this row, so whenever a value is...

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