Excel Macro how to transition between to DIM statements

I have a macro that 2 nice guys on this forum just helped me with.  Now that they helped with one line section I'm trying to join another into one macro process.  I have tried all sorts of transitions.  End, End if, with.  Next... I can't seem to find what will make these work back to back.  Any help will be appreciated

Dim lrow As Long
    lrow = Cells(Cells.Rows.Count, "E").End(xlUp).Row
     Range("N2:N" & lrow).Formula = "=IF(OR(E2=""BWS"",F2=""BWS""),K2*0.5,0)"

?????what transition should I have here???????

Dim lrow As Long
    lrow = Cells(Cells.Rows.Count, "E").End(xlUp).Row
     Range("O2:O" & lrow).Formula = "=IF(OR(G2=""BWS"",H2=""BWS""),K2*0.5,0)"
jenitAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saurabh Singh TeotiaCommented:
You can simply do this...

Dim lrow As Long
    lrow = Cells(Cells.Rows.Count, "E").End(xlUp).Row
     Range("N2:N" & lrow).Formula = "=IF(OR(E2=""BWS"",F2=""BWS""),K2*0.5,0)"
     Range("O2:O" & lrow).Formula = "=IF(OR(G2=""BWS"",H2=""BWS""),K2*0.5,0)"

Open in new window


Saurabh...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jenitAuthor Commented:
You are a rock star!  Sometimes I over think the situation.  You guys today are a prime example of "keeping it simple"  I LIKE IT!

Worked perfect.  Duh on my part and THANKS to you!
0
Saurabh Singh TeotiaCommented:
You are very welcome..And Glad it help.. :-)

Ps. It's not you at times when we working on engrossed in something way too much simple things look complex.. i have done it multiple times myself.. :-)
0
jenitAuthor Commented:
Thanks for the kind words.  You are correct - in too deep.   Thanks for taking the time.  Have a good day!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.