Solved

A better way to make this equation?

Posted on 2014-03-25
1
238 Views
Last Modified: 2014-03-25
Quick form question:

Assuming all the variables are defined correctly and If we have –

i = cCell.row
addr = cCell.Address

With wsBas

      .Range(addr).Offset(0,-25).Value = wsQot.Cells(i, “V”).Value


Is there a way to make the left hand side of the equation in the same form as the right hand side of the equation?  

In other words, using the offset and counting it all out is getting burdensome.  Is there a way to reference the columns instead of the offset?   Much easier I think.  

Example:

Could it be?...

With wsBas
      
      Cells(i, “AA”).Value = wsQot.Cells(i, “V”).Value

...or some other similar form?

thanks!
0
Comment
Question by:BostonBob
1 Comment
 
LVL 39

Accepted Solution

by:
nutsch earned 500 total points
ID: 39954647
You can indeed use

Cells(i, “AA”).Value = wsQot.Cells(i, “V”).Value

but since you're not starting with the ., you're not picking up the parent. YOu might need to if wsbas is not the activesheet.

wsbas.Cells(ccell.row, “AA”).Value = wsQot.Cells(i, “V”).Value

you can also use

wsbas.range("AA" & i).value
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

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

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

15 Experts available now in Live!

Get 1:1 Help Now