Solved

Capture one value in streaming data

Posted on 2014-03-27
4
255 Views
Last Modified: 2014-03-29
Hi All,

I am wondering how to capture  a single value in VBA using this kind of notation:

 "= Round(constants!AO" & i & ",constants!AP" & i & ")"

The problem is that I can capture the cell in question but the cell value is changing in real time.

I just want to be able to capture a single value at the "event" moment; again, I would like the form to be in the form above if possible.

I think what I am looking for is a copy and paste (values only) just before the line of code above.

Copy from Column A to Column B would be a helpful example.  

thanks,
0
Comment
Question by:BostonBob
  • 2
  • 2
4 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39960839
Try

evaluate("= Round(constants!AO" & i & ",constants!AP" & i & ")")
0
 

Author Comment

by:BostonBob
ID: 39962568
Hi,

So I am using:

.Cells(oCell1.row, "P").value = Evaluate("= Round(Counter!W" & i1 & ",Counter!AG" & i1 & ")")

column W + row i, in this case, equals:  14.83918505
Column AG + row i, in this case, equals: 5.

I am getting an answer of: 14.84....on the left hand side of the above equation.  So, I am almost there but the rounding portion is cooperating as I would like (or probably I am missing something).

Call me crazy, but I thought that if I had 5 for the significant digits figure i should end up with:   14.83919, not 14.84.

Please comment.

thanks!
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 39963015
can you upload something for testing?
0
 

Author Closing Comment

by:BostonBob
ID: 39964503
I was missing a comma. Now it works. Thanks!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

746 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

14 Experts available now in Live!

Get 1:1 Help Now