Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help in highlighting the cell color in VBA


Hi All,

I am new to the excel VBA. Your help is appreciated. Please Help me in
vba code for the following points.

I have attached the sample file of how i get and what changes would
required once after i run macro in the excel.

1) Sum to column.
2) If city code numbers are same then highlight the cell backgaround
color.
3) Merge the cell and highlight with the color.

Note: Data may vary. eg If today i am getting 100 tomorrrow it may
1000.

Regards
Praveen.


--
xllearner
------------------------------------------------------------------------
xllearner's Profile: http://www.thecodecage.com/forumz/member.php?u=1961
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=206560

http://www.thecodecage.com/forumz

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help in highlighting the cell color in VBA


Why not record your actions and try to manipulate the code to loop
through the required number of cells. I looked at your file and do not
understand your logic for highlighting duplicate numbers as the numbers
you show you want highlighting are NOT the same?


xllearner;736061 Wrote:

Hi All,

I am new to the excel VBA. Your help is appreciated. Please Help me in
vba code for the following points.

I have attached the sample file of how i get and what changes would
required once after i run macro in the excel.

1) Sum to column.
2) If city code numbers are same then highlight the cell backgaround
color.
3) Merge the cell and highlight with the color.

Note: Data may vary. eg If today i am getting 100 tomorrrow it may
1000.

Regards
Praveen.


--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?u=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=206560

http://www.thecodecage.com/forumz

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help in highlighting the cell color in VBA


Simon Lloyd;736123 Wrote:

Why not record your actions and try to manipulate the code to loop
through the required number of cells. I looked at your file and do not
understand your logic for highlighting duplicate numbers as the numbers
you show you want highlighting are NOT the same?



DUPLICATE THREADS MERGED!




Simon, Thanks for your response.

I did tried recording the action that i want and it worked. However,
recorded action cannot support the data when it vary. Say today, i may
get 100 rows tomorrow it will be 150 or 250......1,000 , 2,000....
(cannot predict).

Highlighting dupicate numbers --- Actually the cells were highlighted
for four pairs. I have attached the new file please check. It is now
highlighted with the four different colors. (It is really not matters
much to me if it highlights with the same color for more than one
duplicate numbers when i run macro).

Apologies for the confusion.

Regards,
Praveen.


+-------------------------------------------------------------------+
|Filename: sample data.xls |
|Download: http://www.thecodecage.com/forumz/attachment.php?attachmentid=622|
+-------------------------------------------------------------------+

--
xllearner
------------------------------------------------------------------------
xllearner's Profile: http://www.thecodecage.com/forumz/member.php?u=1961
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=206560

http://www.thecodecage.com/forumz

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help in highlighting the cell color in VBA


Hi Praveen,

You shouldn't use merged cells.
I also don't see the need for any vba or blank rows.
It looks like this data is from a pivot table?

Anyway, have a look at the attached file which I hope will help.


+-------------------------------------------------------------------+
|Filename: sample data2.xls |
|Download: http://www.thecodecage.com/forumz/attachment.php?attachmentid=623|
+-------------------------------------------------------------------+

--
Evolbob
------------------------------------------------------------------------
Evolbob's Profile: http://www.thecodecage.com/forumz/member.php?u=1980
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=206560

http://www.thecodecage.com/forumz

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
Good / Bad color highlighting in ribbon LBoz Excel Discussion (Misc queries) 3 April 2nd 23 08:10 PM
Conditional Formatting For Highlighting a Cell Color Candy New Users to Excel 2 December 14th 09 06:19 PM
How do I change the color for highlighting cells Kristopher New Users to Excel 1 October 24th 07 02:53 PM
CHANGE THE COLOR OF HIGHLIGHTING SELECTED TEXT Wanda Excel Discussion (Misc queries) 1 August 22nd 07 08:54 PM
highlighting changes by color in an Excel column Eric Excel Worksheet Functions 8 November 7th 06 09:00 PM


All times are GMT +1. The time now is 06:28 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"