Solved

how to multiply two cells in a (relative) column

Posted on 2014-04-07
5
435 Views
Last Modified: 2014-04-10
Hi All,

Today I would like to know how to multiply two scenarios:

1 = if((evaluate(Worksheets("Tickets").Cells(r1, "A").value * Worksheets("Tickets").Cells(r1, "B").value) < evaluate(worksheets("OtherSheets").cells(r1, "D")), 1, 0)  
2 = if((evaluate(Worksheets("Tickers").Cells(r1, "A").value * Worksheets("OtherSheet").cells($d$1).value) < evaluate(worksheets("thisSheet")$e$1)

'not sure  if I have the .cells($d$1) & $e$1 notation right to begin with, in fact I am pretty certain it is butchered and good.

so I would like to know how to write this so that I can do two things:

1.  Write the formulas and "get them ready" to evaluate and get a number (for each formula.)
2. Put the formulas in and have them evaluate, and just get a number and skip the formula  (for each formula.)

Does that make sense?
0
Comment
Question by:BostonBob
  • 2
5 Comments
 
LVL 45

Expert Comment

by:aikimark
Comment Utility
Does r1 refer to row 1 or is this a variable in your routine?

I'm not sure what you mean by "get them ready".

Are you trying to replace formulas with values in your worksheet?

I'm used to seeing worksheet formulas that look simpler:
=IF((Tickets!A3*Tickets!B3)<OtherSheet!D3,1,0)

Open in new window

or
=IF((Tickets!RC[-4]*Tickets!RC[-3])<OtherSheet!RC[-1],1,0)

Open in new window

0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
Comment Utility
Try

= 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)
0
 

Author Comment

by:BostonBob
Comment Utility
I will run with that today Saqib....I think that is what I want.  let me put it in and test it!  THANKS!
0
 

Author Comment

by:BostonBob
Comment Utility
OK that works.  Now how do I get it into this kind of form for both equations above?

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

....where we are "pasting in" the formula?

thanks!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

744 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

16 Experts available now in Live!

Get 1:1 Help Now