Solved

How do I paste these complicated formulas into excel VBA

Posted on 2014-04-10
4
215 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
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…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

920 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now