vba if statement

  1. B

    VBA formatting with an IF statement

    Hello everyone, I am trying to create an IF statement using VBA to format the cells in a row (columns A:H) if certain text is found in column A. The workbook contains account names in Column A. If the name in Column A = "Total Operating Income", "Total Expense", "Total Non-Operating Income"...
  2. C

    IF Column E= "3100" and Column D="GLD" then put "3150" in Column E

    Basically I have a code that changes (column d, BOC) into general ledger numbers converting all 3100-3140 into 3100-3157 however ONLY one Branch (column c, named branches) named "GLD" doesn't need to have its BOC changed it needs to stay 3100-3157 or convert back to 3100-3157. However it isn't...
  3. B

    PLEASE! Macro If statement to copy and paste and add

    So on my first tab I have general grant info. When a new grant is added that's not on my Financial tab, I added a simple Vlookup to indicate that the macro needs to run to add the grant to the financial page. That way we can easily determine if the grant needs to be added to the Financial tab...
  4. E

    Vba if then concatenate

    Hello! I have an issue with this VBA code, can someone have a look at this? ´ trying to get a concatenate (c4 & C8) string starting in B8 based on C8 value (no big test, it has to be > 0) ... the code works fine but instead of getting my (c4 & C8) in column, I am getting "error message" in...
  5. S

    [VBA] If "yes", shows cell content

    Hi everyone, I'm new in VBA and have looked into this for a week but couldn't find any solution T___T I have defined a name to range J38:Q38 with name "Claim" with drop down list option of 'Yes' and 'No'. I would like to make this condition: If "Claim" = 'Yes', cell AK38 shows its content...
  6. L

    VBA If And Then Else Not Working

    Hi Guys, I have this VBA code which I thought was working, but it isn't. At least, not completely. I've spend hours trying to figure out what is wrong but I can't figure it out. Maybe someone here can find it? This is the code: Sub InsertRowAndCopyFormulas() Dim dest As Range...
  7. B

    VBA: to bold text if the text starts with" ["

    I'm trying to create a macro that will bold all text on a row if the text in column A starts with " [" then move down to the next row and repeat. Any suggestions? Example: Column A Column B Column C [501650 Dues] 123 456 Billboard...
  8. C

    VBA if statement depending on result of 2 columns

    Hi Im trying to have text enter cell depending on the result of 2 cells in columns D & F being true so if D2 = VM: and F >= 0 result in R2 = My text so far I have the below code which keeps failing please help been stuck on this for 2 hours now :( Sub IM() Dim rng As Range Dim I As Long Set...
  9. P

    VBA code for Insert new row based on criteria

    Hoping someone can assist. I have a worksheet which contains product line item data. (15 columns across, 400 rows down) I need help with writing code that can Copy and Paste a column (in Column S) from another worksheet and insert a new row based on the criteria of "No" in Column T. It would...
  10. N

    Rewriting each IF statement so that it is on a single line??

    Hi, I have the following IF statement If strMyOperation = "+" Then Worksheets("Sheet1").Range("F10").Value = sngMy1stValue + sngMy2ndValue End If How can I write this on one single line Putting "Worksheets("Sheet1").Range("F10").Value = sngMy1stValue + sngMy2ndValue End If right after...
  11. R

    code to copy/paste entire rows based on cell contents in column B

    I'm trying to copy/paste rows (within a range of rows) based on the value in column B. If the value in column B is "Current Forecast", I would like to copy those entire rows and paste them below in the first available blank row. Here is the code I have so far, but I keep getting various...
  12. M

    VBA: IF... Or... Or... And... Then?

    I'm stuck with an IF statement but I just can't get it right: What I'm trying to write is IF Range("D2").value is either "H", "N", "P" or "R" or if Range("H2").value is less than 7999 or between 22100 and 26500 Then... I know how to write the first part (= all the OR's) but how can I add the...

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