×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Can not get cell in Excel to update automatically

Can not get cell in Excel to update automatically

Can not get cell in Excel to update automatically

(OP)
Hi,
I am fairly new to VB.

I could not get the cell "c11" in Excel to update automatically once a number is entered in cell "c10".

I wrote the following in VB ...
   if c10<=10 then
   x=1.0
   range"c11".value=x
   end if

   if c10>10 then
   x=2.5
   range"c11".value=x
   end if


Thanks in advance for any help.

   

RE: Can not get cell in Excel to update automatically

You need to reference the cell as a range each time.

CODE

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("c10").Value <= 10 Then
x = 1
Else
x = 2.5
End If
Range("c11") = x
End Sub

Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting

Steam Engine enthusiasts: www.essexsteam.co.uk

RE: Can not get cell in Excel to update automatically

(OP)
Johnwm,
Thanks for your respond.

I wrote this statement...
  
 Range("E285").Value = 1.1766 - 1.1766 * Log(d285)

But, I am getting a error.  It does not recognize cell d285.  Am I doing something wrong?

Thanks again.

RE: Can not get cell in Excel to update automatically

As I said, you need to reference the cell as a range each and every time.

 Range("E285").Value = 1.1766 - 1.1766 * Log(RANGE("d285").Value)

Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting

Steam Engine enthusiasts: www.essexsteam.co.uk

RE: Can not get cell in Excel to update automatically

(OP)
I am not a computer person.  So, the computer terminolgy is not understood.
 
Now I understand.  I tried it and it works.  Thanks for your help.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources