Previous in Forum: Another Waste Time?   Next in Forum: Visual basic
Close
Close
Close
45 comments
Rate Comments: Nested
Member

Join Date: Apr 2008
Posts: 8

EXCEL

10/31/2008 6:29 PM

hi everybody,

i am workin on an excel sheet and i am entering data of numbers

if i have many numbers in one column and i want the cell format to be self changed to any color (i.e red) when any number is repeated

can this be implemented? how?

thnx in advance

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Good Answers:

These comments received enough positive votes to make them "good answers".

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Anonymous Poster
#1

Re: EXCEL

10/31/2008 8:16 PM

You can use conditional formatting -

Under the Format Menu, choose Conditional Formatting - a dialogue box will appear and you can set your condition, and under 'format' change the color to red.

Register to Reply
Power-User

Join Date: Aug 2007
Location: San Francisco Bay Area
Posts: 266
Good Answers: 21
#2
In reply to #1

Re: EXCEL

10/31/2008 8:47 PM

Although a good thought, this probably won't meet the lady's needs. The copy of Excel I am using in this machine is a few years old but the cell "conditional format" is limited to the applied cell only and is basic statements like equal to, less than, between, etc.. My copy does not include anything that would do what Sara Lens is asking.

Maybe...doubt it...but maybe the latest Excel has expanded the conditional format statements do Column statements

Sara... to do what you want ... verify no double or repeat entries in a column ... you may need to come up with a VB script attached to the protected cells "on change" or "on update" properties that will look at the column and do an equals check on the range of cells.

__________________
Speed doesn't kill. Sudden stops, brick walls, and old ladies in Buicks do.
Register to Reply
Anonymous Poster
#3
In reply to #2

Re: EXCEL

10/31/2008 9:15 PM

Good point - I was thinking of Excel 2007 where:


One new feature of the Conditional Formatting tool in Microsoft Excel 2007 is the ability to highlight duplicate values in a range. To do this, select the range and choose Conditional Formatting > Highlight Cells Rules and choose Duplicate Values. You can highlight cells that have duplicate values by selecting Duplicate or choose Unique to highlight cells which contain unique values.

Select the format to use and click OK. Now, all cells containing duplicate values will be highlighted using the selected format. If data changes and duplicates are created later on, the conditional format will ensure these cells are highlighted.

Otherwise, would it be possible to install a condition of a formula - perhaps using a 'countif' to determine if there are duplicates?

It is getting late here and my brain isn't working too well.

Register to Reply
Anonymous Poster
#11
In reply to #2

Re: EXCEL

11/02/2008 2:22 AM

In Excel 2003 and below, u can use cond format up to 4 conditions only UNLESS u use a formula to create other conditions. Try to combine conditinal formatting, data validation and dynamic range.

Register to Reply
Guru
United Kingdom - Member - Not a new member!

Join Date: Jun 2008
Location: USA/Europe
Posts: 4547
Good Answers: 68
#17
In reply to #2

Re: EXCEL

11/02/2008 1:38 PM

Hello Switchman:

Just to confirm, I have Excel from Office 2003. It to has very basic formatting choices.

I got into about two years ago but have not used it much since. Then I am pretty sure I wrote my 'instruction' to format it, but, quite what it was I can't recall.

__________________
Take it easy, bb. >"HEAR & you FORGET<>SEE & you REMEMBER<>DO & you UNDERSTAND"<=$=|O|=$=>"Common Sense is Genius dressed in its Working Clothes"<>[Ralph Waldo Emerson]
Register to Reply
Member

Join Date: Apr 2008
Posts: 8
#4

Re: EXCEL

11/01/2008 6:40 PM

i really appreciate your concern but i have tried format methode and did nothin

if VB can work iam not good in dealin with it so if a certain code can help plz write in details

i am still tryin and i am honoured with your help

Register to Reply
Anonymous Poster
#5
In reply to #4

Re: EXCEL

11/01/2008 6:54 PM

I assume then that you do not have Excel 2007, correct?

Register to Reply
5
Anonymous Poster
#6
In reply to #5

Re: EXCEL

11/01/2008 7:03 PM

Alright it is not so late here now, and my brain is working a little better - you can use an "countif" formula:

Assuming the data you are trying to analyze is in the range (column A, rows 2-11) do this: (change the rows/columns according to your worksheet)

  1. Select range A2:A11
  2. Choose Format|Conditional Formatting
  3. From the first dropdown, choose Formula Is
  4. For the formula, enter
    =COUNTIF($A$2:$A$11,A2)>1
  5. Click the Format button.
  6. Select a font colour for highlighting.
  7. Click OK, click OK

Give that a try and let me know.

Register to Reply Good Answer (Score 5)
Commentator

Join Date: Jul 2005
Posts: 65
Good Answers: 4
#9
In reply to #6

Re: EXCEL

11/02/2008 12:09 AM

I tried this with my Office Excel 2003 (XP) version, and it does work splendidly!

(Be sure to adjust the cell references to the spreadsheet cell ranges you are wanting to affect.)

Thanks, and maybe someday I'll get a newer version...

Curtis

Register to Reply
Associate

Join Date: Sep 2008
Posts: 35
Good Answers: 2
#25
In reply to #6

Re: EXCEL

11/03/2008 6:15 AM

Hi all,

One improvement over "Guest"'s formula that I often use is:

1. select the first cell in your range (let's assume A2)

2. Choose Format>Conditional Formatting

3. From the dropdown, choose Formula Is

4. For the formula, enter:

=COUNTIF($A$1:A1,A2)>0

5. , 6. and 7. as in "Guest"'s example

To apply the formula to your range, independently of how many rows you have, all you have to do is just highlight the cell you just formatted (I've assumed A1, but could be another), copy it and then select the whole range you want the format applied to and select Edit>PasteSpecial>Formats. If you've paid attention to entering the "$" signs exactly the way I've described them, then the conditional formatting formula should update itself automatically, and include the whole range. This way if you increase or decrease the number of rows of data there's no need to change the conditional formatting in any way, just copy and paste it :D

Note that for this to work your data range must start at least in row2.

Hope this helps!

__________________
hugomad
Register to Reply
Power-User
Engineering Fields - Piping Design Engineering - New Member Technical Fields - Architecture - New Member

Join Date: Apr 2006
Location: Bangalore India
Posts: 288
Good Answers: 3
#33
In reply to #4

Re: EXCEL

11/04/2008 4:43 AM

hi Sara

i can mail you excel tutorial modules i received during my tenure as a black-belt with caterpillar if you are keen mail me your Id

crm

__________________
Run silent run deep
Register to Reply
Power-User

Join Date: Nov 2006
Location: Mumbai-57
Posts: 107
Good Answers: 1
#38
In reply to #33

Re: EXCEL

11/05/2008 1:04 AM

CRM,

Pls mail me that tutorial and thanks.

Nachi (e-mail: nach_sam@yahoo.com)

Register to Reply
Anonymous Poster
#7

Re: EXCEL

11/01/2008 11:56 PM

Dear there is "conditional formatting" option under "Format" heading,you will find your solution there.

Register to Reply
Guru
Engineering Fields - Electromechanical Engineering - Technical Services Manager Canada - Member - Army brat Popular Science - Cosmology - What is Time and what is Energy? Technical Fields - Architecture - Draftsperson Hobbies - RC Aircraft - New Member

Join Date: Sep 2006
Location: Clive, Alberta, Canada
Posts: 5916
Good Answers: 204
#8

Re: EXCEL

11/02/2008 12:02 AM

'count number of rows
'if 1500, then set color


rowCtr = 4
Do Until Cells(rowCtr, 1) <> ""
If Cells(rowCtr, 4) = "1500" Then Cells(rowRtr, 4).Interior.ColorIndex = 36
rowCtr = rowCtr + 1
Loop

Register to Reply
Member

Join Date: Jul 2007
Posts: 7
#19
In reply to #8

Re: EXCEL

11/02/2008 3:03 PM

I can't understad.

Please give deeply information, at which place we have to write bottom syntax.

rowCtr = 4
Do Until Cells(rowCtr, 1) <> ""
If Cells(rowCtr, 4) = "1500" Then Cells(rowRtr, 4).Interior.ColorIndex = 36
rowCtr = rowCtr + 1
Loop

Register to Reply
2
Guru
Engineering Fields - Electromechanical Engineering - Technical Services Manager Canada - Member - Army brat Popular Science - Cosmology - What is Time and what is Energy? Technical Fields - Architecture - Draftsperson Hobbies - RC Aircraft - New Member

Join Date: Sep 2006
Location: Clive, Alberta, Canada
Posts: 5916
Good Answers: 204
#21
In reply to #19

Re: EXCEL

11/02/2008 4:33 PM

make a button on your sheet, with the 'controls' toolbar

make a macro module.

put the following text in it.

SUB SEL_CLR()

Dim rowCtr as Integer

rowCtr = 4
Do Until Cells(rowCtr, 1) <> ""
If Cells(rowCtr, 4) = "1500" Then Cells(rowRtr, 4).Interior.ColorIndex = 36
rowCtr = rowCtr + 1
Loop

END SUB

then go to the worksheet, right click on the button, and assign the button to execute the macro SEL_CLR.

then when you push the button, the macro will execute..

you can learn vba pretty easy by recording keystrokes with a macro, and seeing what code it makes.

chris

Register to Reply Good Answer (Score 2)
Guru
United Kingdom - Member - Not a new member!

Join Date: Jun 2008
Location: USA/Europe
Posts: 4547
Good Answers: 68
#22
In reply to #21

Re: EXCEL

11/02/2008 8:35 PM

Hello chrisg288:

Just to say I like the way you explained how to work with and in Excel including with Macros and VBA. Learned a few things there, thanks.

Take care,

__________________
Take it easy, bb. >"HEAR & you FORGET<>SEE & you REMEMBER<>DO & you UNDERSTAND"<=$=|O|=$=>"Common Sense is Genius dressed in its Working Clothes"<>[Ralph Waldo Emerson]
Register to Reply
Guru
Engineering Fields - Electromechanical Engineering - Technical Services Manager Canada - Member - Army brat Popular Science - Cosmology - What is Time and what is Energy? Technical Fields - Architecture - Draftsperson Hobbies - RC Aircraft - New Member

Join Date: Sep 2006
Location: Clive, Alberta, Canada
Posts: 5916
Good Answers: 204
#23
In reply to #22

Re: EXCEL

11/02/2008 8:58 PM

sorry.. the button for macros is on the forms toolbar.. not the controls toolbar.

ty

chris

Register to Reply
Guru
United Kingdom - Member - Not a new member!

Join Date: Jun 2008
Location: USA/Europe
Posts: 4547
Good Answers: 68
#24
In reply to #23

Re: EXCEL

11/03/2008 12:50 AM

Hello chrisg288:

Thanks for getting back to me. I have not made macros in Excel but am pretty sure I have made at least one in word?

It may be that I have been reading about and got mixed up with read and learning, as apposed to actually doing......making a macro.

I do not recall seeing a 'button' for macros. I thought I had seen somewhere, perhaps in help or a magazine, how you put a macro together. As I type I am trying (unsuccessfully) to nail the details of the items floating in my mind!

I do not have a good recall for what all the different windows and pop up info windows are called, so I cannot fathom what you mean by "the macro button is on the forms toolbar, not the controls toolbar.

I use things and do thing and go places on my computer and know what I want to achieve and am usually successful............By the Form toolbar, is that in Excel, and does Word have a similar Forms or Templates toolbar, on the right of the screen?

I would be obliged if you could give advice on the meaning of the two toolbars please? I started using Excel maybe 8 months ago. And can pretty much do what I want. But, if I go back there now after a couple of months not using it can take me an hour to 'find everything'?

I will drop you a line to explain better.

Take care........

__________________
Take it easy, bb. >"HEAR & you FORGET<>SEE & you REMEMBER<>DO & you UNDERSTAND"<=$=|O|=$=>"Common Sense is Genius dressed in its Working Clothes"<>[Ralph Waldo Emerson]
Register to Reply
Guru
Engineering Fields - Electromechanical Engineering - Technical Services Manager Canada - Member - Army brat Popular Science - Cosmology - What is Time and what is Energy? Technical Fields - Architecture - Draftsperson Hobbies - RC Aircraft - New Member

Join Date: Sep 2006
Location: Clive, Alberta, Canada
Posts: 5916
Good Answers: 204
#34
In reply to #24

Re: EXCEL

11/04/2008 10:07 AM

here is a link to excel tut that features some conditional formatting for gantt.

Register to Reply
Anonymous Poster
#10

Re: EXCEL

11/02/2008 12:35 AM

Only option is Conditional Formatting

In that u make formula: if condition link with that cell value = somenumber will be formatted as like

Clement

Register to Reply
Participant

Join Date: Nov 2008
Posts: 3
#12

Re: EXCEL

11/02/2008 2:32 AM

Ok lady, tell me exactly what u need, maybe I could be a help.

__________________
mr_chowking
Register to Reply Off Topic (Score 6)
Guru
United Kingdom - Member - Not a new member!

Join Date: Jun 2008
Location: USA/Europe
Posts: 4547
Good Answers: 68
#20
In reply to #12

Re: EXCEL

11/02/2008 3:24 PM

Hello mr_chowking:

Ok lady, tell me exactly what u need, maybe I could be a help.

Just one thing........

This is a site where anyone, men and women ask others who may know, to help them.

It is not a 'one line' chat-up bar.

There is no way you would have said that to a man so why, on your very first post do you totally screw it, and say that kind of thing to a girl?

You are on the wrong site. If you have manners now, on this site, is the time to use them.

Do you honestly think Sara would reply to you. It was just rude.

__________________
Take it easy, bb. >"HEAR & you FORGET<>SEE & you REMEMBER<>DO & you UNDERSTAND"<=$=|O|=$=>"Common Sense is Genius dressed in its Working Clothes"<>[Ralph Waldo Emerson]
Register to Reply Score 1 for Off Topic
Anonymous Poster
#28
In reply to #20

Re: EXCEL

11/03/2008 11:10 AM

Uh oh! Foot in mouth!

Register to Reply Off Topic (Score 5)
Guru
United Kingdom - Member - Not a new member!

Join Date: Jun 2008
Location: USA/Europe
Posts: 4547
Good Answers: 68
#36
In reply to #28

Re: EXCEL

11/04/2008 5:31 PM

Hello Guest,

my post was in response to a sexist remark made by a previous poster, which are hi-lighted.

They were not my remarks. It is the man who made the sexist remark you should be sending this to not me. I certainly did not have my foot in my mouth as you put it. The sexist remarker most definately did, actually both feet, as it was his first post anywhere on this site. Sign in and lets see your colours.

__________________
Take it easy, bb. >"HEAR & you FORGET<>SEE & you REMEMBER<>DO & you UNDERSTAND"<=$=|O|=$=>"Common Sense is Genius dressed in its Working Clothes"<>[Ralph Waldo Emerson]
Register to Reply Score 1 for Off Topic
Anonymous Poster
#40
In reply to #36

Re: EXCEL

11/05/2008 3:40 AM

Okay let's try it your way.

To Mr Chowking:

Please to consider the foot extricated and removed from babybear's mouth, and put into your own mouth!

Register to Reply Score 1 for Off Topic
Anonymous Poster
#41
In reply to #40

Re: EXCEL

11/05/2008 4:06 AM

To the honorable GUEST

How to extricate foot in XL2003:

Ctrl + F = Find, Ctrl + U = Underline, Ctrl + C = Copy, Ctrl +K = Insert Hyperlink

and another Ctrl + U to underline all! Thanks

Please to consider the foot extricated and removed from babybear's mouth, and put into your own mouth!

Register to Reply Score 1 for Off Topic
Anonymous Poster
#42
In reply to #41

Re: EXCEL

11/09/2008 11:49 AM

Sorry, babybear. MrChowking says to keep foot and take his foot...and whatever...as well. Oh, well. You musta been right... cuz he's still riled about it.

Me just keep tongue in cheek.

Register to Reply Score 1 for Off Topic
Participant

Join Date: Jul 2008
Posts: 1
#13

Re: EXCEL

11/02/2008 3:06 AM

i'm not a frequent excel user but i have this Excel 2007 Bible e-book

msg me if u want a copy

Register to Reply
Anonymous Poster
#37
In reply to #13

Re: EXCEL

11/04/2008 9:21 PM

Hi.

I would like receive e-book

Register to Reply Off Topic (Score 5)
Power-User

Join Date: Nov 2006
Location: Mumbai-57
Posts: 107
Good Answers: 1
#39
In reply to #13

Re: EXCEL

11/05/2008 1:09 AM

eworque,

Pls mail me that e-book and thanks.

Nachi (e-mail: nach_sam@yahoo.com)

Register to Reply
Associate

Join Date: Sep 2006
Location: San Diego
Posts: 28
#14

Re: EXCEL

11/02/2008 3:10 AM

Send me an email to my box and will send you the visual basic program to do it.

Register to Reply
Anonymous Poster
#15

Re: EXCEL

11/02/2008 3:29 AM

Hi Sara,

There is a function called Conditional Formatting that you can find in the Format drop down menu. It's self explanatory and basically you set the conditions to trigger an effect as well as the effect itself.

Register to Reply
Active Contributor

Join Date: Nov 2007
Location: Kingston, Ontario, Canada
Posts: 19
Good Answers: 2
#16

Re: EXCEL

11/02/2008 12:17 PM

Sara Lens,

Another easy way (regardless of which version of Excel you're using) is to simply 'Find and Replace' (press ctrl+F). In this menu, you can search for the value, and replace the cell with the same value but having 'Fill'ed the cell with any color or other method of formatting. The one downside to this is that it must be re-done after each time the sheet is updated as it is not a 'live updating' method. (To re-do this, either clear all formatting from the sheet (from the Home > Clear > Clear Formats tab in Excel '07, with removes all underlining, coloured cells, etc in the sheet), or Find and Replace (F+R) what you changed the cells to in your previous search back to its original formatting (i.e. F+R your value with the colour you selected, replace it with the value and no fill). Now, F+R the new value, and change it to the new colour.)

Hope this helps. Excel is a pretty powerful tool once understood.

-MechMatt

__________________
mechmatt
Register to Reply
Guru
United Kingdom - Member - Not a new member!

Join Date: Jun 2008
Location: USA/Europe
Posts: 4547
Good Answers: 68
#18

Re: EXCEL

11/02/2008 1:46 PM

Hi to all,

excuse me Sara, but has anyone else been having problems with the spell-checker today? It just will not work for me and freezes as I try to check.

It may be to do with my computer so I will look into it if no one has had the same problem.

Take care

__________________
Take it easy, bb. >"HEAR & you FORGET<>SEE & you REMEMBER<>DO & you UNDERSTAND"<=$=|O|=$=>"Common Sense is Genius dressed in its Working Clothes"<>[Ralph Waldo Emerson]
Register to Reply
Participant

Join Date: Nov 2008
Posts: 3
#26

Re: EXCEL

11/03/2008 7:38 AM

Try this one:

For XL2003

1. COLOR DUPLICATE CELL:

Click Insert>Name>Define

Define Name as "Dyna"

On the "Refers To" Box type

=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A),1)

Click OK...

Click Format>Conditional Formatting>Formula Is......

=COUNTIF(DYNA,A1)>1

and the formatting .... (back color, font color etc etc.)

Close

Note: In this case there is no need to specify or highlight the range, row is automatically added in the range once it is filled with data.

2. AVOID ENTERING DUPLICATE VALUE:

Click Tools>Data Validation....In Allow Box click "Custom"

In the "Formula Box" type..

=COUNTIF($A:$1,A1)=1

Click "Error Alert Tab"..... On "Error Alert" type

DUPLICATE VALUE! or whatever alert pop up note u want..

Click OK..... Ctrl+C cell A1 (highlight) and paste it to desired range in Col.A

try it! Let me know if it works.....Einshala!

Sorry for my English!

It is the same in XL2007 aside from different location of menus...

__________________
mr_chowking
Register to Reply Score 1 for Good Answer
Associate

Join Date: Sep 2008
Posts: 35
Good Answers: 2
#27
In reply to #26

Re: EXCEL

11/03/2008 8:41 AM

Neat! Quite ellegant

__________________
hugomad
Register to Reply
Guru
United Kingdom - Member - Not a new member!

Join Date: Jun 2008
Location: USA/Europe
Posts: 4547
Good Answers: 68
#32
In reply to #26

Re: EXCEL

11/04/2008 2:23 AM

Hello mr_chowking:

Just to say I like your Excel explanation. And may well use it myself.

__________________
Take it easy, bb. >"HEAR & you FORGET<>SEE & you REMEMBER<>DO & you UNDERSTAND"<=$=|O|=$=>"Common Sense is Genius dressed in its Working Clothes"<>[Ralph Waldo Emerson]
Register to Reply
Anonymous Poster
#29

Re: EXCEL

11/03/2008 11:53 AM

Yes -

Use your pull down menu to select FORMAT

Select CONDITIONAL FORMAT

set each cell to according to the condition (=, <, <=, >, NOT...) - this can be another cell or specific value.

and then select the Format button in the bottom right corner - this will allow you to set the font colour, size, cell background or cell border.

Register to Reply
2
Anonymous Poster
#30

Re: EXCEL

11/03/2008 12:42 PM

Hi-

I believe you'll find what you need here:

http://www.cpearson.com/excel/Duplicates.aspx

Regards, George

Register to Reply Good Answer (Score 2)
Guru
Hobbies - CNC - New Member Hobbies - DIY Welding - New Member Engineering Fields - Electromechanical Engineering - New Member

Join Date: Aug 2007
Posts: 23647
Good Answers: 420
#31

Re: EXCEL

11/03/2008 1:43 PM

Did you search out past links?.....

http://cr4.globalspec.com/thread/14872#newcomments

Other than that there are some very good comments that were added to these posts

__________________
“ When people get what they want, they are often surprised when they get what they deserve " - James Wood
Register to Reply
Anonymous Poster
#35

Re: EXCEL

11/04/2008 12:49 PM

yes of course.

Register to Reply
Member

Join Date: Apr 2008
Posts: 8
#43

Re: EXCEL

11/09/2008 7:15 PM

hi,

i've been trying the conditionnal format but a message appears everytime sayin that there is an error in formula !!!

thnx for ur efforts and i am still in need for ur help urgently

if anybody wanna send me a tutorial my mail is:

sara_elusive@yahoo.com

thnx in advance

Register to Reply
Guru
United Kingdom - Member - Not a new member!

Join Date: Jun 2008
Location: USA/Europe
Posts: 4547
Good Answers: 68
#44
In reply to #43

Re: EXCEL

11/09/2008 7:40 PM

Hello Sara,

just to say it is not a good idea to publish your email in open forum. It is just asking for spam. I hope you will be OK, but, you can never be sure.

You can alway write to admin to ask for it to be removed. If you want that is?

__________________
Take it easy, bb. >"HEAR & you FORGET<>SEE & you REMEMBER<>DO & you UNDERSTAND"<=$=|O|=$=>"Common Sense is Genius dressed in its Working Clothes"<>[Ralph Waldo Emerson]
Register to Reply Score 1 for Good Answer
Member

Join Date: Apr 2008
Posts: 8
#45

Re: EXCEL

11/10/2008 4:24 PM

oppps

u r totaly right!

hey all

can i ask a question

the method of the duplicate alert is good one but the formula is not correct i think

but i wanna know if this method will work after entering a duplicate value not in specific range?

thnx in advance

Register to Reply
Register to Reply 45 comments

Good Answers:

These comments received enough positive votes to make them "good answers".

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Copy to Clipboard

Users who posted comments:

ANKUR (1); Anonymous Poster (16); babybear (8); chrisg288 (4); crm (1); eworque (1); hugomad (2); MechMatt (1); mr_chowking (2); Nachi (2); phoenix911 (1); reygalindo (1); sara lens (3); Switchman (1); WhiteHorse (1)

Previous in Forum: Another Waste Time?   Next in Forum: Visual basic

Advertisement