Solved

Capture one value in streaming data

Posted on 2014-03-27
4
259 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Multiple Open Excel Spreadsheets 12 39
Dynamic Chart Range 13 32
Excel IF formula 3 19
Assigning VBA code to a specific worksheet 3 23
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.
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

776 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