Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 155
Default Data not populating

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Data not populating

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" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Data not populating

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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


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 [email protected] Excel Programming 3 November 8th 07 05:59 AM
Populating data on Forms from spreadsheet data Kristen[_6_] Excel Programming 3 April 13th 06 07:29 AM
Populating data to other worksheet via data validation kuansheng Excel Programming 2 February 16th 06 08:18 AM
Populating Data and Looking Up Info. Sabunabu Excel Worksheet Functions 1 January 26th 06 07:16 PM
populating excel cells with data from data sources Craig[_25_] Excel Programming 1 December 21st 05 12:46 AM


All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"