if else statement

  1. C

    if else function won't work

    Hi, currently writing a VBA where if the value of range I10 in sheet name Main is equal to 1H, then the value of range ("B20") in sheet name Part 1 would be January sub working() Dim reportprd as string reportprd = thisworkbook.sheets("Main").Range("I10").value if reportprd="1H" then...
  2. D

    If else formula

    Hello i have the following formula, and woul dlike to see if i can add something to it like an If else statement this is my original formula =IF($J5="","Set currency",IF($M5="Calendar",IFERROR(VLOOKUP($J5,'Foreign Exchange Rates'!$C$2:$F$201,2,FALSE),"No Rate"),"Please Fill Out")) but would...
  3. angeloudaki

    Return value based on other cells

    Hi! I thought I had this - turns out I am rubbish. I basically want to return a value in N3, if F3 (text data input) contains a value in N2 (header), otherwise return 0 I currently have : =COUNTIF($F3,"*"&N$2&"*") which works great to return a numerical value, but i want to later get a string...
  4. J

    Simple Excel if and Function formula help

    I want a formula that If sum of H1 & I1 less than or equal to 2 and if I1 is greater than 0 then H1*1000+I1*500 else H1*1000+I1*500
  5. N

    using If to compare 2 cells VBA Excel 2016

    Hi, I am trying to have VBA check if the active cell contains the word that is in cell A5 on sheet 2. Here is what I have for my code. But it keeps comming back false. Can any one tell me how else to write this? The Active cell has Apples/red and cell A5 has Apples. If ActiveCell Like...
  6. S

    Help needed on macro for project!

    Hi, I am trying to write a macro to assign a set new of serial number to each row. For example, each row will be given a number (in sequence) after every 8 rows and when there are no other numbers below it, the code will go back up again to continue the pattern again. Any help on this will be...
  7. G

    Macro Excel :using Range in a FOR loop with IF statement

    The table is <tbody> SEQ acc bsb 1 123 4567 bas 456 789 2 123 4567 3 147 78999 </tbody> Below is the code Private Sub CommandButton1_Click() Dim InitialRow As Integer InitialRow = 2 Set BaseSheet = ThisWorkbook.Sheets("sheet2") FinalRow = BaseSheet.Cells(BaseSheet.Rows.Count...
  8. S

    VBA Else statement is not working

    Hi Members, I have this following code where, I tested it in all way, I feel the Else part of the coding is not working. Please help me to highlight where is the problem in this code. Why it does not coming in Else part. Regards Sun. STEP1 = Calculation If (condition) Then STEP2 = STEP1 - 1...

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