Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Dr. Mike
 
Posts: n/a
Default Function won't return value in merged cells

I have a need for when deleting the formula within a cell, another
cell's value will appear as default. Following is a formula that
serves, and works well in a single, unmerged cell. However, it--not
anything else I have tried--works in a group of merged cells. Does
anyone have a suggestion, and even better, an adaption to this formula?

Private Sub Worksheet_Change(ByVal TargetCell As Range)

If Not Intersect(TargetCell, Range("L14:L14")) Is Nothing Then
If TargetCell = "" Then
TargetCell = "=Sheet1!O14"
End If
End If
End Sub

Thanks,

Dr. M

  #3   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Function won't return value in merged cells

My simple test worked. What is happening with you?

--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)

"Dr. Mike" wrote in message
oups.com...
I have a need for when deleting the formula within a cell, another
cell's value will appear as default. Following is a formula that
serves, and works well in a single, unmerged cell. However, it--not
anything else I have tried--works in a group of merged cells. Does
anyone have a suggestion, and even better, an adaption to this formula?

Private Sub Worksheet_Change(ByVal TargetCell As Range)

If Not Intersect(TargetCell, Range("L14:L14")) Is Nothing Then
If TargetCell = "" Then
TargetCell = "=Sheet1!O14"
End If
End If
End Sub

Thanks,

Dr. M



  #4   Report Post  
Posted to microsoft.public.excel.misc
Rookie 1st class
 
Posts: n/a
Default Function won't return value in merged cells

Is it a named range? I've had similar problems there. Try renaming it with
only the leading cell, if that doesn't work try "RangeStart:RangeStop"
hth Lou

"Dr. Mike" wrote:

I have a need for when deleting the formula within a cell, another
cell's value will appear as default. Following is a formula that
serves, and works well in a single, unmerged cell. However, it--not
anything else I have tried--works in a group of merged cells. Does
anyone have a suggestion, and even better, an adaption to this formula?

Private Sub Worksheet_Change(ByVal TargetCell As Range)

If Not Intersect(TargetCell, Range("L14:L14")) Is Nothing Then
If TargetCell = "" Then
TargetCell = "=Sheet1!O14"
End If
End If
End Sub

Thanks,

Dr. M


  #5   Report Post  
Posted to microsoft.public.excel.misc
Dr. Mike
 
Posts: n/a
Default Function won't return value in merged cells

The formula I posted works fine with single cells. However, what I am
trying to do is have the value of a single cell show within a single
selection of merged cells once I've deleted the contents of the merged
cells. What works for single cells doesn't seem to work for merged
cells. If you have a solution, I'm all ears. Regardless, thanks for
your effort.

Dr. M



  #6   Report Post  
Posted to microsoft.public.excel.misc
Dr. Mike
 
Posts: n/a
Default Function won't return value in merged cells

Unfortunately, my project is limited in space and the text I'm trying
to bring to the merged cell also requires a text wrap. Anyway, thanks
for your response.

Dr. M

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
how do i link merged cells to a merged cell in another worksheet. ibbm Excel Worksheet Functions 3 April 27th 06 11:40 PM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Use functions when cells are merged Amanda Excel Worksheet Functions 3 September 12th 05 06:08 PM
Sorting Area with Merged Cells prizm1 New Users to Excel 3 September 10th 05 11:49 PM
Function to list values of last 3 non-blank cells in a vertical bl ANJ Excel Worksheet Functions 1 April 14th 05 12:53 AM


All times are GMT +1. The time now is 03:13 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"