if else

  1. J

    what is wrong with my if else statement

    =IF(F2>0.5,'positive', IF(F2<-0.3, 'negative', 'neutral'))
  2. P

    Change color of cell on condition

    Hi Guys, I'm using following code to change color of a cell based on if else statement. Sub Change_Color() If Worksheets("Main").Range("I3").Value >= 40000 Then Worksheets("Main").Range("K3").Interior.Color = RGB(0, 255, 0) Else...
  3. J

    how to add new column of data that depends on value of other column

    Original table <tbody> Date Target May 1, 2014 May 2, 2014 May 3, 2014 May 4, 2014 </tbody> I have an excel table populated with 2 columns Date and Target where Target is a binary column which will be filled with either 1 or 0. I want to write a function such that if date is...
  4. V

    If else formula

    I have data ranging from -80 to +80. i want to show if data is greater than +8 its "Over allocated" and if less than -8 its "Under allocated" else its "Allocated". how to write if else formula for this one???
  5. M

    Perform IF, ELSE, AND in a Loop

    Hello, i'am trying to use macro to search through a column to find specific words if it finds it, a value is assigned to the column next to it, it must be done in a loop and should read from each cell word by word, for example: IF John Then ID = 256 IF John AND Smith Then ID = 231 Name...
  6. R

    If - Else Statement Not Working

    I am not sure why my code is not working. This part of my program is for updating a record. So the user would enter in the license plate number which is the criteria for the record search and then enter in their updates in the remaining text boxes. My problem is that I want my program to send...
  7. J

    I need help with my macro using a mathematical equation incorporating if else statements

    I am attempting to recollect my college programming courses to remember my coding and I am stumped by my if else statement. I have posted the code below:<o:p> </o:p> Sub CalculateAQI() ' ' 'User inputs a numerical value located in cell (1,6) and then runs this macro Cells(1, 6).Value = I If 0 <=...
  8. D

    Next Without For When Many If Statements

    Hi, I am looping through the different sheets in a workbook and filtering by different criteria depending on the value of two different strings. There are 36 possible combinations of these string values so I need many If..ElseIf statements. However, when I have the full code I get an error...
  9. E

    VLookUP - tables, values

    I have made a pricing template for my work - the basic spreadsheet relied upon a 'model' selected from a dropdown list (J1) this would then help to select a column in a table contained on a seperate sheet (Bonnet) for the price of the model, this would later be determined by dimensions and...
  10. I

    If or Index/Match that updates based on date?

    Hello. I’m using Excel 2010 and trying to automate a report I have to update every month. I’ve used a named range (CurrentMonth) for the reporting month and an index for the monthly data I need to update. This works fine for timephased data, however, there is one column that needs to get info...
  11. H

    Help with Nested IFOR syntax

    Hi all, I have the following statement that is returning #Value. Can anyone help me with the syntax please? =IF(Detail!E4<>"", "FILLED",IF(Summary!C4<>""+Detail!E4="",EMPTY,"")) So it should be If E4(detail tab) contains any text print FILLED, ELSE if both C4(summary tab) and E4(detail...
  12. H

    Only show conditional formatting when some of row has been populated

    Hi all, Wondering if you could help please. I have 2 worksheets. One is a summary page with slim rows that uses conditional formatting red or clear/blank depending if the corresponding cell on the detailed tab is filled or not. The second contains the comments and is full of text. The summary...
  13. L

    MsgBox placing

    Hi folks, I have the following coding that display a message should one of the mandatory fields be empty (validation). Now, my problem is that the placing of the variables in the MsgBox is hardocded, i.e. if all fields are filled except Postal code, Postal code will appear in the last line...
  14. H

    Nested if function not working, only 2 of the 4 if's work

    additional infor.. i broke it down to the rudimentary code, and still only two of the 4 work... Sub craptest() LastRow = Range("A65536").End(xlUp).Row For k = 1 To LastRow Step 1 If Cells(k, 19) = "Rewash" Then Cells(k, 26) = Cells(k, 19) Else If Cells(k, 19) = "Virgin" Then Cells(k, 26) =...
  15. S

    Automatically Change the Date

    I have a spreadsheet where I have the date in cell D2 next to a button. When I click the button I need code that checks to see if it has been a month since that date in cell D2. If it has been a month the date changes to the new date. I know I need to use an If else within this code but I am not...
  16. C

    Run time error 13 in an If Else

    Still new to VBA, and I'm on the verge of tearing my hair out. I'm running into a run time error 13 in my If Else statement. What I'm trying to do is run through data in column F "Product ID" of my sheet called "Raw Sales" and if the value is a 4 it uses a vlookup to look up value in column B (a...
  17. C

    Writing IF statement for ODD numbers

    Hello! I am trying to figure out how to write an IF statement such as this IF (value in column A is ODD, then do this) IF (value in column A is EVEN, then do this) All in the same string. Suggestions?

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