Computing.Net > Forums > Office Software > Excel Macro help.

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Excel Macro help.

Reply to Message Icon

Name: KevinMc
Date: February 18, 2009 at 11:36:21 Pacific
OS: Windows Vista
CPU/Ram: 1.66GHz/2.5GB
Product: Dell / INSPIRON 1520
Subcategory: Microsoft Office
Comment:

Hi all, I need help with an excel macro problem. I am creating what I thought was a simple scheduling macro. Basically I need to take batch residence times (a positive whole number) from cells in sheet1 and use these values to highlight that number of cells in a row on sheet2. I understand about recording a macro and can highlight the cells in this manner. However, I cannot figure out how to take the value from one cell and use it on another one to highlight that number of cells. Anyone out there who can help?



Sponsored Link
Ads by Google

Response Number 1
Name: DerbyDad03
Date: February 18, 2009 at 13:46:35 Pacific
Reply:

What do you mean by "highlight" the cells?

Do you want to select the cells or turn them a certain color or...?


0

Response Number 2
Name: KevinMc
Date: February 18, 2009 at 18:41:12 Pacific
Reply:

Yes, turn the background a certain colour. Thanks for the reply.


0

Response Number 3
Name: DerbyDad03
Date: February 18, 2009 at 20:47:18 Pacific
Reply:

Assuming a 6 in Sheet1!A1, this will fill Sheet2!A1:A6 with Green:

Sub ColorRange()
 Sheets(2).Range(Cells(1, 1), Cells(1, Sheets(1).Range("A1"))).Interior.ColorIndex = 4
End Sub

Hope that helps.


0

Response Number 4
Name: KevinMc
Date: February 19, 2009 at 13:40:41 Pacific
Reply:

Excellent, this works. Thank you very much.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Excel Macro help.

Excel macro help www.computing.net/answers/office/excel-macro-help/2723.html

Excel: Macro Help www.computing.net/answers/office/excel-macro-help/7252.html

Run Excel Macro as Automated Task on Server www.computing.net/answers/office/run-excel-macro-as-automated-task-on-server/9661.html