Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

How do I paste these complicated formulas into excel VBA

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
BostonBob
Asked:
BostonBob
  • 2
1 Solution
 
plusone3055Commented:
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
 
BostonBobAuthor Commented:
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
 
MacroShadowCommented:
"= 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
 
BostonBobAuthor Commented:
Thanks for that.  I will check them now.  

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

thanks!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now