+ Reply to Thread
Results 1 to 21 of 21

If function & conditional formatting

Hybrid View

spursrule68 If function & conditional... 05-31-2012, 06:00 AM
jraj1106 Re: If function & conditional... 05-31-2012, 06:11 AM
spursrule68 Re: If function & conditional... 05-31-2012, 06:14 AM
jraj1106 Re: If function & conditional... 05-31-2012, 06:18 AM
spursrule68 Re: If function & conditional... 05-31-2012, 06:20 AM
Fotis1991 Re: If function & conditional... 05-31-2012, 06:14 AM
spursrule68 Re: If function & conditional... 05-31-2012, 06:18 AM
Fotis1991 Re: If function & conditional... 05-31-2012, 06:19 AM
spursrule68 Re: If function & conditional... 05-31-2012, 06:21 AM
Fotis1991 Re: If function & conditional... 05-31-2012, 06:25 AM
spursrule68 Re: If function & conditional... 05-31-2012, 06:43 AM
Fotis1991 Re: If function & conditional... 05-31-2012, 07:03 AM
spursrule68 Re: If function & conditional... 05-31-2012, 07:07 AM
Fotis1991 Re: If function & conditional... 05-31-2012, 07:18 AM
spursrule68 Re: If function & conditional... 05-31-2012, 07:22 AM
Fotis1991 Re: If function & conditional... 05-31-2012, 07:25 AM
spursrule68 Re: If function & conditional... 05-31-2012, 07:45 AM
Fotis1991 Re: If function & conditional... 05-31-2012, 07:55 AM
spursrule68 Re: If function & conditional... 05-31-2012, 08:00 AM
Fotis1991 Re: If function & conditional... 05-31-2012, 08:08 AM
spursrule68 Re: If function & conditional... 05-31-2012, 08:13 AM
  1. #1
    Forum Contributor
    Join Date
    02-07-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    172

    If function & conditional formatting

    Really easy question probably, if I want the if function to determine whetehr the cell A2 has content or no content. I.e. if it has a character in it, what do I write in the

    'logical test box'?


    If characters are present i would like my new cell A13 to turn blue.

    How can i achieve this?
    Last edited by spursrule68; 05-31-2012 at 06:06 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: If function & conditional formatting

    Hi

    Try this:

    Book1.xlsm
    Click *, if my suggestion helps you. Have a good day!!

  3. #3
    Forum Contributor
    Join Date
    02-07-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    172

    Re: If function & conditional formatting

    hi, thanks for the reply, you could save the file as excel 2000 please as my excel version cannot open it

    thanks

  4. #4
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: If function & conditional formatting

    This is the code:

    Private Sub Worksheet_Change(ByVal Target As Range)
        If Range("A2").Value <> "" Then
            Range("A13").Select
            With Selection.Interior
                .Pattern = xlSolid
                .PatternColorIndex = xlAutomatic
                .ThemeColor = xlThemeColorLight2
                .TintAndShade = 0
                .PatternTintAndShade = 0
            End With
        Else
            Range("A13").Select
            With Selection.Interior
                .Pattern = xlNone
                .TintAndShade = 0
                .PatternTintAndShade = 0
            End With
        End If
    End Sub

  5. #5
    Forum Contributor
    Join Date
    02-07-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    172

    Re: If function & conditional formatting

    Quote Originally Posted by jraj1106 View Post
    This is the code:

    Private Sub Worksheet_Change(ByVal Target As Range)
        If Range("A2").Value <> "" Then
            Range("A13").Select
            With Selection.Interior
                .Pattern = xlSolid
                .PatternColorIndex = xlAutomatic
                .ThemeColor = xlThemeColorLight2
                .TintAndShade = 0
                .PatternTintAndShade = 0
            End With
        Else
            Range("A13").Select
            With Selection.Interior
                .Pattern = xlNone
                .TintAndShade = 0
                .PatternTintAndShade = 0
            End With
        End If
    End Sub
    great, i've pasted that in the vba section under worksheet one.

    What do i need to do for it to work?

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: If function & conditional formatting

    Hi

    In conditional format rules, try

    =A1<>""
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  7. #7
    Forum Contributor
    Join Date
    02-07-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    172

    Re: If function & conditional formatting

    Hi fotis.

    thanks for the reply.

    I am pretty much a novice at excel so could you guide me through it step by step?

    Thanks mate

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: If function & conditional formatting

    You changed the title in 11:06. I send my answer at 11:04 and deleted immediately..

    In conditional format rules, type this formula that i provided you...


    Also your request here is a little different than here...

    http://www.excelforum.com/excel-prog...-function.html

    So, pls don;t send the same question twice!!

    It;s duplicate thread..

  9. #9
    Forum Contributor
    Join Date
    02-07-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    172

    Re: If function & conditional formatting

    oh, sorry.

    Ignore that thread, let that one rot away. i'll make sure not to create duplicats, although that question is slightly different to this one.

  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: If function & conditional formatting

    ..I am waiting for a Moderator order..

    May i continue answering in this thread??

  11. #11
    Forum Contributor
    Join Date
    02-07-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    172

    Re: If function & conditional formatting

    ok I'll wait.

  12. #12
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: If function & conditional formatting

    As i saw a Moderator, closed your other Thread. So i can continue here.

    I apologize for the comfusion, i don't want to be unpolite, but i believe that all of us must Obey to the forum rules.

    So in A13, open the Conditional formatting rulew and type the formula. Choose blue color>>Ok.

    See the example.

    Is this, works for you?
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    02-07-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    172

    Re: If function & conditional formatting

    That is superb mate! much appreciated!

    Just a quick question. if a web query draws in datafrom a table from a web page daily, but sometimes that web page does not contain the table, will the web query cells overwrite with the invalid section or will the old data remain?

  14. #14
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: If function & conditional formatting

    ..Iam not sure if i understand well your question(My English, are not so good), but i think that will these will be overwriten...

    But, pls, take another opinion for this...!

  15. #15
    Forum Contributor
    Join Date
    02-07-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    172

    Re: If function & conditional formatting

    thanks anyway

    For everyone else:

    I have a webquery that references TWO rows when the table is present

    When the table is not present, will it only reference one line - the line saying no table is available or will the two lines remain and the data will not be updated?

    Thanks

  16. #16
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: If function & conditional formatting

    You are welcome!

    My suggestion is to start anew Thread for this question

  17. #17
    Forum Contributor
    Join Date
    02-07-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    172

    Re: If function & conditional formatting

    Quote Originally Posted by Fotis1991 View Post
    You are welcome!

    My suggestion is to start anew Thread for this question
    Very very very last question before I class this as solved.

    What would I need to change in terms of the conditional formatting equation so that if any characters are in the cell A2, the colour changes?

  18. #18
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: If function & conditional formatting

    ..You mean ..=IF(ISTEXT(A1)>>>Green color...??

    =IF(isnumber(a1)>>Blue color...?

  19. #19
    Forum Contributor
    Join Date
    02-07-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    172

    Re: If function & conditional formatting

    fotis - as in

    the same conditional formatting formula except can the formula
    =A2<>""

    be changed so that if anything is written in A2, the cell colour changes

  20. #20
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: If function & conditional formatting

    But this formula, DOES, exactly this...

    This means that if you type ANYTHING in A2,then A13 become Blue, or else is Blank...

    So...?

  21. #21
    Forum Contributor
    Join Date
    02-07-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    172

    Re: If function & conditional formatting

    Quote Originally Posted by Fotis1991 View Post
    But this formula, DOES, exactly this...

    This means that if you type ANYTHING in A2,then A13 become Blue, or else is Blank...

    So...?
    Lol yeah you are correct! My bad, sorry for wasting your time

    YOu have helped me a lot!

+ 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