Solved

How do I paste these complicated formulas into excel VBA

Posted on 2014-04-10
4
216 Views
Last Modified: 2014-04-12
How do I paste these formulas into VBA with excel?

= IIf(Evaluate(Worksheets("Tickets").Cells(r1, "A").Value * Worksheets("Tickets").Cells(r1, "B").Value) < Evaluate(Worksheets("OtherSheets").Cells(r1, "D")), 1, 0)

and

a = IIf(Evaluate(Worksheets("Tickers").Cells(r1, "A").Value * Worksheets("OtherSheet").Range("$d$1").Value) < Evaluate(Worksheets("thisSheet").Range("$e$1")), 1, 0)

and get them "paste ready" in this form?:

"= If(quotes!V" & i & ">Constants!AK" & i & ", 1, 0)"


thanks for your help!
0
Comment
Question by:BostonBob
  • 2
4 Comments
 
LVL 22

Expert Comment

by:plusone3055
ID: 39992493
how about you watch a nice video on this topic  

Convert MS Excel Formula to VBA code
https://www.youtube.com/watch?v=OADbmMboIRo

a nice conversion table that goes along with it
http://www.techonthenet.com/excel/formulas/convert.php
0
 

Author Comment

by:BostonBob
ID: 39992996
I have seen that video. I am pretty handy now doing the smaller formulas but I can't seem to make this work.

Any mercy you can bestow on me my lord would be much appreciated!

thanks!
0
 
LVL 27

Accepted Solution

by:
MacroShadow earned 500 total points
ID: 39996545
"= IIf(Evaluate(Worksheets(""Tickets"").Cells(r1, ""A"").Value * Worksheets(""Tickets"").Cells(r1, ""B"").Value) < Evaluate(Worksheets(""OtherSheets"").Cells(r1, ""D"")), 1, 0)"

Open in new window

"a = IIf(Evaluate(Worksheets(""Tickers"").Cells(r1, ""A"").Value * Worksheets(""OtherSheet"").Range(""$d$1"").Value) < Evaluate(Worksheets(""thisSheet"").Range(""$e$1"")), 1, 0)"

Open in new window

0
 

Author Comment

by:BostonBob
ID: 39996748
Thanks for that.  I will check them now.  

I just posted another question.  Easy pickings for you....

thanks!
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question