PC Review


Reply
Thread Tools Rate Thread

Data not populating

 
 
Carlee
Guest
Posts: n/a
 
      8th Jun 2008
Hi there,
I am using the following code to populate my MTD and YTD columns. They were
working fine, but now are not. Not sure what i am missing. Any ideas?
Nothing seems to work, even when i break it right down.

Code:
If Range("B4") = "January" Then
'MTD
Range("AH7").Value = "worked"
'Range("AH7").Value = Worksheets("Year at a
Glance").Range("C5").Value 'operating hours

Range("AH9:AH10").Value = Worksheets("Year at a
Glance").Range("C7:C8").Value 'Plant & Total Availability
Range("AH11").Value = Worksheets("Year at a
Glance").Range("C9").Value 'Water Feed Flow, m3
Range("AH12").Value = Worksheets("Year at a
Glance").Range("C10").Value 'water feed flow, m3/h

.....
End if
--
Carlee
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      8th Jun 2008
It works fine for me.

Do you get an error message of any kind?

Is the sheet with January on B4 active? Is it protected?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Carlee" <(E-Mail Removed)> wrote in message
news:EC82347D-6A4E-48C0-A853-(E-Mail Removed)...
> Hi there,
> I am using the following code to populate my MTD and YTD columns. They
> were
> working fine, but now are not. Not sure what i am missing. Any ideas?
> Nothing seems to work, even when i break it right down.
>
> Code:
> If Range("B4") = "January" Then
> 'MTD
> Range("AH7").Value = "worked"
> 'Range("AH7").Value = Worksheets("Year at a
> Glance").Range("C5").Value 'operating hours
>
> Range("AH9:AH10").Value = Worksheets("Year at a
> Glance").Range("C7:C8").Value 'Plant & Total Availability
> Range("AH11").Value = Worksheets("Year at a
> Glance").Range("C9").Value 'Water Feed Flow, m3
> Range("AH12").Value = Worksheets("Year at a
> Glance").Range("C10").Value 'water feed flow, m3/h
>
> ....
> End if
> --
> Carlee



 
Reply With Quote
 
Tim Williams
Guest
Posts: n/a
 
      8th Jun 2008
Does it do *anything* ?
How is the code being run ?

I would suggest starting by qualifiying all of your ranges with a worksheet
object. Omitting this can cause problems when the activesheet is not the
one expected.

Also, you might think about using the worksheets' code names instead of
their tab names: it's easier to write the code and if a user changes the
tabname it won't break your macro. The sheet codenames can be viewed (and
changed) in the VBE. To change the name, select a sheet in the VBE and edit
the Name in the Properties pane (F4).

Tim


"Carlee" <(E-Mail Removed)> wrote in message
news:EC82347D-6A4E-48C0-A853-(E-Mail Removed)...
> Hi there,
> I am using the following code to populate my MTD and YTD columns. They
> were
> working fine, but now are not. Not sure what i am missing. Any ideas?
> Nothing seems to work, even when i break it right down.
>
> Code:
> If Range("B4") = "January" Then
> 'MTD
> Range("AH7").Value = "worked"
> 'Range("AH7").Value = Worksheets("Year at a
> Glance").Range("C5").Value 'operating hours
>
> Range("AH9:AH10").Value = Worksheets("Year at a
> Glance").Range("C7:C8").Value 'Plant & Total Availability
> Range("AH11").Value = Worksheets("Year at a
> Glance").Range("C9").Value 'Water Feed Flow, m3
> Range("AH12").Value = Worksheets("Year at a
> Glance").Range("C10").Value 'water feed flow, m3/h
>
> ....
> End if
> --
> Carlee



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Macro for taking data external data and populating it on a sheet and deleting unwanted data bkmn4u@aol.com Microsoft Excel Programming 3 8th Nov 2007 05:59 AM
Populating data on Forms from spreadsheet data Kristen Microsoft Excel Programming 3 13th Apr 2006 07:29 AM
populating excel cells with data from data sources Craig Microsoft Excel Programming 1 21st Dec 2005 12:46 AM
Populating disconnected ADODB.Recordset with System.Data.DataTable data. elcc1958@yahoo.com Microsoft ADO .NET 4 31st May 2004 02:31 PM
Populating disconnected ADODB.Recordset with System.Data.DataTable data. elcc1958@yahoo.com Microsoft Dot NET 0 11th May 2004 03:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:15 AM.