+ Reply to Thread
Results 1 to 8 of 8

conditional formatting problem

  1. #1
    Forum Contributor
    Join Date
    03-24-2007
    Posts
    107

    conditional formatting problem

    I tried conditional formatting but am doing something wrong.

    Please help

    Anyway, the spreadsheet attached explains it a bit better
    Attached Files Attached Files
    Last edited by rookie37; 09-13-2010 at 06:08 AM.
    Excel 2007

  2. #2
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Kalgoorlie Australia
    MS-Off Ver
    Excel 2007/10
    Posts
    251

    Re: conditional formatting problem

    Hello rookie37
    I don't think you can make it change front size with con formatting, or not in 2003 anyway.
    But I named the cell j46 as "yesno" and made it change the font style in e7, so I don't know if thats any good to you.
    Someone with a bit more experiance may know of a way.
    Regards
    Peter
    Obviously I named the copy of sheet1 j46 as yesno, so you would have to change the ref to sheet1 j46 (not the copy)
    Regards
    Peter
    Attached Files Attached Files
    Last edited by peterjuhnke; 09-11-2010 at 07:15 AM.

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: conditional formatting problem

    You cannot change font size with conditional formatting.

    If you are happy with a macro you could try this in the sheet module for "Sheet1"

    Note that you have renamed Sheet2 as "Sheet1". This means that the module you are looking for is
    Sheet2(Sheet1)
    Please Login or Register  to view this content.

    If you don't need the cell coloured then delete these lines
    Please Login or Register  to view this content.

    Hope ths helps
    Last edited by Marcol; 09-12-2010 at 06:09 AM. Reason: Error in formatting code corrected
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Forum Contributor
    Join Date
    03-24-2007
    Posts
    107

    Re: conditional formatting problem

    Thank you Marcol.

    I'm embarrassed to say that I don't know how to use it as I have a very limited knowledge of code

    I went into sheet 1, ( renamed as EOT tab. If I understood macros I wouldn't get this messy) left click on the tab, selected view code, and copy and pasted your macro on it.
    It didn't work. I'm sure I did it wrong.

    I don't know what is easier. You could explain it to me how to insert the code properly, or you can make the changes and explain what you did so that I learn.

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: conditional formatting problem

    Hi rookie37

    No need to be embarassed, that's what we are here for to help people to learn.

    1/. With your workbook select sheet "EOT tab"
    2/. Right Click on the sheet tab. Select "View Code"
    3/. In the resultant pane paste all of the given code
    4/. Save file and exit the Vba editor.

    Please note it will depend on the Zoom Level you have chosen how the result will display.

    I have attached a version of your workbook as a demo
    Attached Files Attached Files
    Last edited by Marcol; 09-12-2010 at 07:03 AM.

  6. #6
    Forum Contributor
    Join Date
    03-24-2007
    Posts
    107

    Re: conditional formatting problem

    I doesn't work. However because you said it depends on the zoom level, that may be a problem with my video card. I zoomed in and out with no success but I have always had a problem with my video card.

    By the way, I tried to install the code the way you said. I also tried the file that you repaired and sent back to me.

    My graphics do weird things. Often, the pictures on my spreadsheets move and increase in size. I then scroll or zoom out or in and they are back to where they should be.

    If I am in a word document and typed the text above, it sometimes looks like:

    I doesn't work. However because you said it depends on the zoom level, that may be a problem with
    I doesn't work. However because you said it depends on the zoom level, that may be a problem with
    I doesn't work. However because you said it depends on the zoom level, that may be a problem with
    I doesn't work. However because you said it depends on the zoom level, that may be a problem with
    I doesn't work. However because you said it depends on the zoom level, that may be a problem with

    but then it changes back to normal

  7. #7
    Forum Contributor
    Join Date
    03-24-2007
    Posts
    107

    Re: conditional formatting problem

    I just thought of a way. It is a bit bodgy but I'll do it if we can't think of something else

    I want 142.5 but get 143 instead

    I can set it up to get 142
    AND
    if cell e7 = 142 then cell f7 = .5 else blank (I don't want to display a zero)
    However I also have to change others and I don't know how to do multiple if then statements

    How do I write

    if cell e7 = 142 or 52 or 67 or 82 or 97 then cell f7 = .5

    If it is easy to do I would also put
    if cell e7 = 86 then cell f7 = .25
    Last edited by rookie37; 09-11-2010 at 11:24 PM.

  8. #8
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: conditional formatting problem

    I've double checked everything and made a change to the formatting code.

    With your chosen font this works and displays correctly at zoom levels of 100% and above.

    I don't want to widen the column as that will stuff up my calendar
    I don't see why it should.

    Your problem lies with your column widths, 4pts will only display 4 digits with calibri, you are wanting to display 5.
    I would suggest you change all the column widths to 6pts and format E7 Number > "0.0" then there should be no need for any code to change font size.

    Select Columns A to AK then Format > Column Width = 6 > OK

    if gmt = 5:45, the standard meridian should be 86.25 not 86
    If you also need this then format E7 Number > "0.00" and change the column widths accordingly

    I have changed the attachment in Post #5 rather than add a new attachment here.

    I suggest you look at this link
    Description of how column widths are determined in Excel
    http://support.microsoft.com/kb/214123

    I hope this helps.
    Last edited by Marcol; 09-12-2010 at 07:07 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1