+ Reply to Thread
Results 1 to 4 of 4

Need a little more help with formatting!

  1. #1
    Registered User
    Join Date
    08-16-2005
    Posts
    4

    Need a little more help with formatting!

    First of all I want to say thanks to Tom for helping me out. I am working with what was given to me but I still can't get it to work like I want.

    Location Device 1 Fail Comments & Notes
    Location Device 2 Fail Comments & Notes
    Location Device 1 Pass Comments & Notes
    Location Device 3 Fail Comments & Notes
    Location Device 4 Fail Comments & Notes
    Location Device 4 Pass Comments & Notes
    Location Device 3 Pass Comments & Notes
    Location Device 8 Fail Comments & Notes
    Location Device 8 Pass Comments & Notes
    Location Device 1 Fail Comments & Notes

    Exactly what I need to do is to make it so that when I enter a "Device # Fail" then it turns bold.

    I also think that I need to create an array with the different device types and declare all the types in the array.

    The next thing I need to do is to have excel see the bold failed device and then copy the entire row that it is in to another sheet.

    I have about 15 different device types and am able to only get one device to become bold. I still have not gotten to work on copying rows to another sheet so any help would be appreciated. I will keep working with what I have and what I know.

  2. #2
    Tom Ogilvy
    Guest

    Re: Need a little more help with formatting!

    for each cell in Range("C2:C100")
    if Instr(1,cell.Value,"Fail",vbTextCompare) then
    if not cell.Font.Bold then
    cell.Font.bold = True
    cell.EntrireRow.copy Destination:= _
    worksheets("Failures").Cells(rows.count,1).End(xlup)(2)
    end if
    else
    cell.Font.bold = False
    end if
    Next

    Assumes the strings you show are in C2 to C100

    --
    Regards,
    Tom Ogilvy


    "hawaiian_native"
    <[email protected]> wrote in
    message news:[email protected]...
    >
    > First of all I want to say thanks to Tom for helping me out. I am
    > working with what was given to me but I still can't get it to work like
    > I want.
    >
    > Location Device 1 Fail Comments & Notes
    > Location Device 2 Fail Comments & Notes
    > Location Device 1 Pass Comments & Notes
    > Location Device 3 Fail Comments & Notes
    > Location Device 4 Fail Comments & Notes
    > Location Device 4 Pass Comments & Notes
    > Location Device 3 Pass Comments & Notes
    > Location Device 8 Fail Comments & Notes
    > Location Device 8 Pass Comments & Notes
    > Location Device 1 Fail Comments & Notes
    >
    > Exactly what I need to do is to make it so that when I enter a "Device
    > # Fail" then it turns bold.
    >
    > I also think that I need to create an array with the different device
    > types and declare all the types in the array.
    >
    > The next thing I need to do is to have excel see the bold failed device
    > and then copy the entire row that it is in to another sheet.
    >
    > I have about 15 different device types and am able to only get one
    > device to become bold. I still have not gotten to work on copying rows
    > to another sheet so any help would be appreciated. I will keep working
    > with what I have and what I know.
    >
    >
    > --
    > hawaiian_native
    > ------------------------------------------------------------------------
    > hawaiian_native's Profile:

    http://www.excelforum.com/member.php...o&userid=26351
    > View this thread: http://www.excelforum.com/showthread...hreadid=397220
    >




  3. #3
    Registered User
    Join Date
    08-16-2005
    Posts
    4

    Thanks for the help Tom!!

    I just want to say thank you for the code that you have supplied.

    I have tried both of the ways that you suggested but they still didn't work.
    I ended up using a long If then Else statement. So far what I want to be bolded is now bold. Now my problem is figuring out how to get the row that what is bolded to copy over to another sheet in the same workbook.

    I have attempted to use your code and modify it so that it looks for only a row with a bolded cell but I have not succeeded yet.

    Also the code that you have supplied works partially. By partially I mean that it makes only one device type bold but does not copy to the other sheet. The other problem is that I my sheet keeps refreshing itself and just flickers at me.

    If anyone could help out with copying an entire row that has a bolded cell in it then I would be grateful.

  4. #4
    David McRitchie
    Guest

    Re: Need a little more help with formatting!

    I presume you fixed the typo in cell.EntrireRow.copy
    changing it to cell.EntireRow.copy

    The flickering you can change by turning off screen updating
    http://www.mvps.org/dmcritchie/excel...htm#slowmacros

    Looks to me like Tom's code does what you are asking for, unless
    I don't understand the question or the answer. The worksheet
    "Failues" must exist in your workbook. What did it do instead of work.

    Since you are replying to Tom's reply you should have replied to his post
    in this thread rather replying to your original post in this thread. That's why
    they are called threads.

    ---
    HTH,
    David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

    "hawaiian_native" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I just want to say thank you for the code that you have supplied.
    >
    > I have tried both of the ways that you suggested but they still didn't
    > work.
    > I ended up using a long If then Else statement. So far what I want to
    > be bolded is now bold. Now my problem is figuring out how to get the
    > row that what is bolded to copy over to another sheet in the same
    > workbook.
    >
    > I have attempted to use your code and modify it so that it looks for
    > only a row with a bolded cell but I have not succeeded yet.
    >
    > Also the code that you have supplied works partially. By partially I
    > mean that it makes only one device type bold but does not copy to the
    > other sheet. The other problem is that I my sheet keeps refreshing
    > itself and just flickers at me.
    >
    > If anyone could help out with copying an entire row that has a bolded
    > cell in it then I would be grateful.
    >
    >
    > --
    > hawaiian_native
    > ------------------------------------------------------------------------
    > hawaiian_native's Profile: http://www.excelforum.com/member.php...o&userid=26351
    > View this thread: http://www.excelforum.com/showthread...hreadid=397220
    >




+ 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