Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 82
Default Blank cell from another page within a worksheet?

Hi,

I am trying to find a way to leave a blank cell on my summary sheet that is
populated from another sheet within the worksheet.

i.e.
Summary page - A1 is populated from worksheet1 from D5

If D5 says 'Yes' then 'Yes' appears in A1 of my summary sheet

My question is how can I leave A1 blank if D5 is blank on worksheet1?

At the moment if D5 is Blank I get a '0' in A1 on my summary sheet which
does not visually very nice.

Thank you for your help in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 82
Default Blank cell from another page within a worksheet?

Opps i forgat to tell you that the forula in A1 is currently =RP1!D5

"Scoober" wrote:

Hi,

I am trying to find a way to leave a blank cell on my summary sheet that is
populated from another sheet within the worksheet.

i.e.
Summary page - A1 is populated from worksheet1 from D5

If D5 says 'Yes' then 'Yes' appears in A1 of my summary sheet

My question is how can I leave A1 blank if D5 is blank on worksheet1?

At the moment if D5 is Blank I get a '0' in A1 on my summary sheet which
does not visually very nice.

Thank you for your help in advance.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Blank cell from another page within a worksheet?

"Scoober" wrote:
.. the formula in A1 is currently =RP1!D5


One usual way: =IF(RP1!D5="","",RP1!D5)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 82
Default Blank cell from another page within a worksheet?

Thanks that works perfectly.

Can I ask if it is possible to add this formula to a number of cells in one
go that are already populated with the original and incorrect formula, so I
don't have to go back and enter your formula to some 200 cells?

"Max" wrote:

"Scoober" wrote:
.. the formula in A1 is currently =RP1!D5


One usual way: =IF(RP1!D5="","",RP1!D5)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Blank cell from another page within a worksheet?

.. if it is possible to add this formula to a number of cells in one
go that are already populated with the original and incorrect formula,
so I don't have to go back and enter your formula to some 200 cells?


In a spare copy of your file,
try running the sub below on the selected formulas range

Option Explicit
Sub testme01()
'Amended from a Dave Peterson posting
'Sub will change cells with formulas such as: =RP1!D5
'into: =IF(RP1!D5="","",RP1!D5)
'Select the range with the formulas to change.
'You can include empty cells and cells with values,
'but don't include any cells with formulas that shouldn't be changed.
'Note: Save your file first.
'If sub doesn't work correctly, you can close without saving.

Dim myFormula As String
Dim NewFormula As String
Dim myCell As Range
Dim myRng As Range

Set myRng = Nothing
On Error Resume Next
Set myRng = Intersect(Selection, _
Selection.Cells.SpecialCells(xlCellTypeFormulas))
On Error GoTo 0

If myRng Is Nothing Then
MsgBox "Please select a range with formulas!"
Exit Sub
End If

For Each myCell In myRng.Cells
With myCell
myFormula = Mid(.Formula, 2)
NewFormula = "=if(" & myFormula & "="""",""""," & myFormula & ")"
.Formula = NewFormula
End With
Next myCell

End Sub

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 82
Default Blank cell from another page within a worksheet?

I have seen this done a long time ago. I have 2007 and cannot seem to find
sub which i think is short for substitute. Sorry to pull teeth but would you
know how to find sub on 2007?

"Max" wrote:

.. if it is possible to add this formula to a number of cells in one
go that are already populated with the original and incorrect formula,
so I don't have to go back and enter your formula to some 200 cells?


In a spare copy of your file,
try running the sub below on the selected formulas range

Option Explicit
Sub testme01()
'Amended from a Dave Peterson posting
'Sub will change cells with formulas such as: =RP1!D5
'into: =IF(RP1!D5="","",RP1!D5)
'Select the range with the formulas to change.
'You can include empty cells and cells with values,
'but don't include any cells with formulas that shouldn't be changed.
'Note: Save your file first.
'If sub doesn't work correctly, you can close without saving.

Dim myFormula As String
Dim NewFormula As String
Dim myCell As Range
Dim myRng As Range

Set myRng = Nothing
On Error Resume Next
Set myRng = Intersect(Selection, _
Selection.Cells.SpecialCells(xlCellTypeFormulas))
On Error GoTo 0

If myRng Is Nothing Then
MsgBox "Please select a range with formulas!"
Exit Sub
End If

For Each myCell In myRng.Cells
With myCell
myFormula = Mid(.Formula, 2)
NewFormula = "=if(" & myFormula & "="""",""""," & myFormula & ")"
.Formula = NewFormula
End With
Next myCell

End Sub

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Blank cell from another page within a worksheet?

Assuming D5 either contain text or blank then try this:

=REPT('RP1'!D5,1)


"Scoober" wrote:

Opps i forgat to tell you that the forula in A1 is currently =RP1!D5

"Scoober" wrote:

Hi,

I am trying to find a way to leave a blank cell on my summary sheet that is
populated from another sheet within the worksheet.

i.e.
Summary page - A1 is populated from worksheet1 from D5

If D5 says 'Yes' then 'Yes' appears in A1 of my summary sheet

My question is how can I leave A1 blank if D5 is blank on worksheet1?

At the moment if D5 is Blank I get a '0' in A1 on my summary sheet which
does not visually very nice.

Thank you for your help in advance.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 82
Default Blank cell from another page within a worksheet?

Yes that works! :)

Can I ask if it is possible to add this formula to a number of cells in one
go that are already populated with the original and incorrect formula, so I
don't have to go back and enter your formula to some 200 cells indiviually?

"Teethless mama" wrote:

Assuming D5 either contain text or blank then try this:

=REPT('RP1'!D5,1)


"Scoober" wrote:

Opps i forgat to tell you that the forula in A1 is currently =RP1!D5

"Scoober" wrote:

Hi,

I am trying to find a way to leave a blank cell on my summary sheet that is
populated from another sheet within the worksheet.

i.e.
Summary page - A1 is populated from worksheet1 from D5

If D5 says 'Yes' then 'Yes' appears in A1 of my summary sheet

My question is how can I leave A1 blank if D5 is blank on worksheet1?

At the moment if D5 is Blank I get a '0' in A1 on my summary sheet which
does not visually very nice.

Thank you for your help in advance.

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
Worksheet opens to blank page-no cells ramrod Excel Discussion (Misc queries) 4 January 9th 08 12:34 AM
Link to last non-blank cell in another worksheet Shelly Excel Discussion (Misc queries) 4 April 19th 07 06:16 PM
Clear cell borders for blank white page TJAC Excel Discussion (Misc queries) 2 February 21st 07 02:32 PM
Clear cell borders for blank white page john Excel Discussion (Misc queries) 0 February 21st 07 01:53 PM
change cell size from page to page on the same worksheet Danny Excel Worksheet Functions 2 December 15th 05 06:20 PM


All times are GMT +1. The time now is 12:44 PM.

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

About Us

"It's about Microsoft Excel"