Solved

How do I paste these complicated formulas into excel VBA

Posted on 2014-04-10
222 Views
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)"

0
Question by:BostonBob
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2

LVL 22

Expert Comment

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

Convert MS Excel Formula to VBA code

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

Author Comment

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

ID: 39996545
``````"= IIf(Evaluate(Worksheets(""Tickets"").Cells(r1, ""A"").Value * Worksheets(""Tickets"").Cells(r1, ""B"").Value) < Evaluate(Worksheets(""OtherSheets"").Cells(r1, ""D"")), 1, 0)"
``````
``````"a = IIf(Evaluate(Worksheets(""Tickers"").Cells(r1, ""A"").Value * Worksheets(""OtherSheet"").Range(""\$d\$1"").Value) < Evaluate(Worksheets(""thisSheet"").Range(""\$e\$1"")), 1, 0)"
``````
0

Author Comment

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

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

thanks!
0

Featured Post

Question has a verified solution.

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

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month2 days, 18 hours left to enroll