Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Kasey Kern
 
Posts: n/a
Default Help with a formula..

I am trying to create a formula that will take information from a cell on one
sheet and combine it with text on another sheet. I know how to get the two
together. My problem is that I want the part that is brought in to be bolded
type. Here is what I have in the formula. ="we are pleased to submit our
quotation for "&(cell reference)&" according to the following
specifications." What I want to do is have the cell reference part be bold
type. Is there a way to do that? It doesnt work if I bold the cell.. already
tried it.. Any suggestions?

Thanks!
KK
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

You'd need to use an event macro instead of a formula. One way:

Put this in your worksheet code module (right-click the worksheet tab
and choose View Code):

Private Sub Worksheet_Calculate()
Const sPLEASED As String = "We are pleased to submit our " & _
"quotation for # according to the following specifications."
Dim nPos As Long
Dim sRef As String

nPos = InStr(sPLEASED, "#")
sRef = Sheets("Sheet2").Range("J10").Text
With Range("A1")
.Font.Bold = False
.Value = Application.Substitute(sPLEASED, "#", sRef)
.Characters(nPos, Len(sRef)).Font.Bold = True
End With
End Sub



In article ,
"Kasey Kern" wrote:

I am trying to create a formula that will take information from a cell on one
sheet and combine it with text on another sheet. I know how to get the two
together. My problem is that I want the part that is brought in to be bolded
type. Here is what I have in the formula. ="we are pleased to submit our
quotation for "&(cell reference)&" according to the following
specifications." What I want to do is have the cell reference part be bold
type. Is there a way to do that? It doesnt work if I bold the cell.. already
tried it.. Any suggestions?

  #3   Report Post  
Kasey Kern
 
Posts: n/a
Default

I put that into the sheet and nothing happened.. Is there something that I
need to do to get that macro to run?

"JE McGimpsey" wrote:

You'd need to use an event macro instead of a formula. One way:

Put this in your worksheet code module (right-click the worksheet tab
and choose View Code):

Private Sub Worksheet_Calculate()
Const sPLEASED As String = "We are pleased to submit our " & _
"quotation for # according to the following specifications."
Dim nPos As Long
Dim sRef As String

nPos = InStr(sPLEASED, "#")
sRef = Sheets("Sheet2").Range("J10").Text
With Range("A1")
.Font.Bold = False
.Value = Application.Substitute(sPLEASED, "#", sRef)
.Characters(nPos, Len(sRef)).Font.Bold = True
End With
End Sub



In article ,
"Kasey Kern" wrote:

I am trying to create a formula that will take information from a cell on one
sheet and combine it with text on another sheet. I know how to get the two
together. My problem is that I want the part that is brought in to be bolded
type. Here is what I have in the formula. ="we are pleased to submit our
quotation for "&(cell reference)&" according to the following
specifications." What I want to do is have the cell reference part be bold
type. Is there a way to do that? It doesnt work if I bold the cell.. already
tried it.. Any suggestions?


  #4   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

How about?


"right-click the worksheet tab
and choose View Code):"

Then paste it there




--
Regards,

Peo Sjoblom

(No private emails please)


"Kasey Kern" wrote in message
...
I put that into the sheet and nothing happened.. Is there something that I
need to do to get that macro to run?

"JE McGimpsey" wrote:

You'd need to use an event macro instead of a formula. One way:

Put this in your worksheet code module (right-click the worksheet tab
and choose View Code):

Private Sub Worksheet_Calculate()
Const sPLEASED As String = "We are pleased to submit our " & _
"quotation for # according to the following specifications."
Dim nPos As Long
Dim sRef As String

nPos = InStr(sPLEASED, "#")
sRef = Sheets("Sheet2").Range("J10").Text
With Range("A1")
.Font.Bold = False
.Value = Application.Substitute(sPLEASED, "#", sRef)
.Characters(nPos, Len(sRef)).Font.Bold = True
End With
End Sub



In article ,
"Kasey Kern" wrote:

I am trying to create a formula that will take information from a cell
on one
sheet and combine it with text on another sheet. I know how to get the
two
together. My problem is that I want the part that is brought in to be
bolded
type. Here is what I have in the formula. ="we are pleased to submit
our
quotation for "&(cell reference)&" according to the following
specifications." What I want to do is have the cell reference part be
bold
type. Is there a way to do that? It doesnt work if I bold the cell..
already
tried it.. Any suggestions?



  #5   Report Post  
Kasey Kern
 
Posts: n/a
Default

That is what I did. I saved the sheet.. nothing happens.. I enabled the
macros too. anything else?

"Peo Sjoblom" wrote:

How about?


"right-click the worksheet tab
and choose View Code):"

Then paste it there




--
Regards,

Peo Sjoblom

(No private emails please)


"Kasey Kern" wrote in message
...
I put that into the sheet and nothing happened.. Is there something that I
need to do to get that macro to run?

"JE McGimpsey" wrote:

You'd need to use an event macro instead of a formula. One way:

Put this in your worksheet code module (right-click the worksheet tab
and choose View Code):

Private Sub Worksheet_Calculate()
Const sPLEASED As String = "We are pleased to submit our " & _
"quotation for # according to the following specifications."
Dim nPos As Long
Dim sRef As String

nPos = InStr(sPLEASED, "#")
sRef = Sheets("Sheet2").Range("J10").Text
With Range("A1")
.Font.Bold = False
.Value = Application.Substitute(sPLEASED, "#", sRef)
.Characters(nPos, Len(sRef)).Font.Bold = True
End With
End Sub



In article ,
"Kasey Kern" wrote:

I am trying to create a formula that will take information from a cell
on one
sheet and combine it with text on another sheet. I know how to get the
two
together. My problem is that I want the part that is brought in to be
bolded
type. Here is what I have in the formula. ="we are pleased to submit
our
quotation for "&(cell reference)&" according to the following
specifications." What I want to do is have the cell reference part be
bold
type. Is there a way to do that? It doesnt work if I bold the cell..
already
tried it.. Any suggestions?





  #6   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Did you cause a calculation (F9)?

In article ,
"Kasey Kern" wrote:

That is what I did. I saved the sheet.. nothing happens.. I enabled the
macros too. anything else?

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
writing a formula for a colored value aaronwexler New Users to Excel 11 September 1st 05 03:11 PM
referencing named formula using INDIRECT function [email protected] Excel Worksheet Functions 19 May 11th 05 09:48 AM
Simplify formula Luke Excel Worksheet Functions 37 May 6th 05 07:21 AM
put formula results into a different cell if it is empty PutFormula Excel Worksheet Functions 2 February 11th 05 03:31 AM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM


All times are GMT +1. The time now is 02:59 AM.

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"