Hello Expert,
If I have to use Blue color font for prime numbers in a given range, using Excel 2007 ( without VB) is possible?
Any suggestion?
Thanks
Hello Expert,
If I have to use Blue color font for prime numbers in a given range, using Excel 2007 ( without VB) is possible?
Any suggestion?
Thanks
you could use conditional format.
Below is the link to learn more about it.
http://www.contextures.com/xlCondFormat01.html
Click * to reward me...
Thank you...
Hi Karnik,
See the attached file :-
Prime Number.xlsx
Regards,
DILIPandey
<click on below 'star' if this helps>
DILIPandey, Excel rMVP
+919810929744 (India), +971528225509 (Dubai), [email protected]
Missed to apply the conditional formatting.. now applied, see attached:-
Prime Number.xlsx
Regards,
DILIPandey
<click on below 'star' if this helps>
Here is the best way I have found to do this:
Insert this Function into a VBA Module:Then highlight the entire range of cells and apply conditional formatting using this formula: =IsPrime(A1) where A1 is the first row/column in your selected range.Please Login or Register to view this content.
- Moo
Last edited by Moo the Dog; 11-19-2012 at 01:17 AM. Reason: IsPrime Code from Blue Moose Technology
I don't think so.
By Prime numbers, do you mean, 1, 3, 5, 7, 11, etc?
Please consider:
Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
@ dilipandey,
Nice one. However the first two lines are wrong.
Actually, Winon, it is correct. 1 is not a prime (according to just about every mathematician, and 2 is a prime.
- Moo
@ Moo the Dog,
Yeah, First cup of Java is only kicking in now!
Thank you.
@ dilipandey
Sorry dilipandey.
I like your approach with the Helper Column B, and the Format should look like this.
Thanks Moo for clarifying the point ..
Thanks to Winon for quick understanding and enhancing the conditional formatting
Karnik, hope your query is resolved.
Regards,
DILIPandey
<click on below 'star' if this helps>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks