#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Format cell

Hello,

I am pulling two different fields from an Access database and putting them
into one cell in Excel. This works fine. What I need to know is to BOLD and
UNDERLINE the first field in the cell but not the second field. Can this be
done?

The variable names a
var_ID
Var_Name
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Format cell

turn on the macro recorder and do it manually.

Turn off the macro recorder and look at the code.

--
Regards,
Tom Ogilvy


"RatherBeeHome" wrote:

Hello,

I am pulling two different fields from an Access database and putting them
into one cell in Excel. This works fine. What I need to know is to BOLD and
UNDERLINE the first field in the cell but not the second field. Can this be
done?

The variable names a
var_ID
Var_Name

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Format cell

Tom,

I turned the Macro Recorder on. When I BOLD the item manually, I get a
message that says, "Unable to record". What is going on?

"Tom Ogilvy" wrote:

turn on the macro recorder and do it manually.

Turn off the macro recorder and look at the code.

--
Regards,
Tom Ogilvy


"RatherBeeHome" wrote:

Hello,

I am pulling two different fields from an Access database and putting them
into one cell in Excel. This works fine. What I need to know is to BOLD and
UNDERLINE the first field in the cell but not the second field. Can this be
done?

The variable names a
var_ID
Var_Name

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Format cell

I don't know. I did it manually and recorded:
ActiveCell.FormulaR1C1 = "abcd-efgh"
Range("F3").Select
ActiveCell.FormulaR1C1 = "abcd-efgh"
With ActiveCell.Characters(Start:=1, Length:=4).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleSingle
.ColorIndex = xlAutomatic
End With
With ActiveCell.Characters(Start:=5, Length:=5).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("G3").Select

Which could be culled down to

Sub mySub()
With ActiveCell
.FormulaR1C1 = "abcd-efgh"
With .Characters(Start:=1, Length:=4).Font
.Bold = True
.Underline = True
End With
End With
End Sub

--
Regards,
Tom Ogilvy


"RatherBeeHome" wrote:

Tom,

I turned the Macro Recorder on. When I BOLD the item manually, I get a
message that says, "Unable to record". What is going on?

"Tom Ogilvy" wrote:

turn on the macro recorder and do it manually.

Turn off the macro recorder and look at the code.

--
Regards,
Tom Ogilvy


"RatherBeeHome" wrote:

Hello,

I am pulling two different fields from an Access database and putting them
into one cell in Excel. This works fine. What I need to know is to BOLD and
UNDERLINE the first field in the cell but not the second field. Can this be
done?

The variable names a
var_ID
Var_Name

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Format cell


Only problem with that is is assumes that the var_ID is always 4
characters long. If this is the case hen there wont be a problem.

How are you importing the values from Access and how are you combining
them?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Format cell

Glad your back, everyone is waiting to see your solution:

" a user interface thing where you ask the person to check for duplicates,
if they hit yes it
pauses the code and resumes on enter?"

--
Regards,
Tom Ogilvy



"Stopher" wrote in message
oups.com...

Only problem with that is is assumes that the var_ID is always 4
characters long. If this is the case hen there wont be a problem.

How are you importing the values from Access and how are you combining
them?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lock Cell Format - Allow copy and paste of data without format change Chris12InKC Excel Worksheet Functions 2 May 9th 23 07:42 PM
cell format - remove cell format pattern without effecting colors Bas Excel Discussion (Misc queries) 1 March 23rd 09 02:54 PM
Can cell format come from and change with reference cell format jclouse Excel Discussion (Misc queries) 1 November 29th 06 03:20 AM
Excel Auto-Format cell to email format Please Help Me Excel Discussion (Misc queries) 1 March 23rd 06 05:15 PM
How do I copy data in single cell format to a merged cell format Paul Excel Discussion (Misc queries) 1 June 27th 05 11:00 AM


All times are GMT +1. The time now is 01:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"