Squeeze out the empty cells for printing?

mikejan

New Member
Joined
Jun 16, 2015
Messages
3
Hey everyone. See lots of chatter about hiding rows and columns, but I need to figure out how to squeeze out individ cells that came back with a blank from an IF formula (see image below).

Want to eliminate all the red space so I have a neat list per day. Any ideas? Thanks :)




2015-06-16_0710.png
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Want to eliminate all the red space so I have a neat list per day. Any ideas?

I'm mightedly confused what you want here :confused:

If you delete the individual cells then what do you want to replace them as it shifts from either right,left,up or down? or if you clear the cells then the formulas go but you still have the cells appearing blank or as you stated you can hide the columns or/and rows.

Perhaps you can provide a sample of how you want it to look afterwards?
 
Upvote 0
Thanks for the note, sorry about the confusion. Want to take the data from this:

2015-06-16_0847.png


TO THIS ===================================================================

2015-06-16_0850.png


Was thinking there might be was a way to pull (reference) the data out of the one spreadsheet that does the calculations - and then display within a 2nd sheet to print.

Any ideas?
 
Upvote 0
Try the code below but change Sheet1 to the name of your sheet. Code goes in a regular module.

Code:
Sub DeleteMe()
    Dim test As Worksheet, x As Long, lr As Long
    Sheets("[COLOR="#FF0000"]Sheet1[/COLOR]").Copy After:=Sheets(Sheets.Count)
    ActiveSheet.Name = "aSHEET"
    lr = Sheets("aSHEET").Range("R:R").Find(What:="*", SearchOrder:=xlRows, SearchDirection:=xlPrevious, LookIn:=xlFormulas).Row
    For x = lr To 3 Step -1
        If Sheets("aSHEET").Cells(x, "R") = "" Then Sheets("aSHEET").Cells(x, "R").Delete Shift:=xlUp
    Next
    Sheets("aSHEET").PrintOut
    Application.DisplayAlerts = False
    Sheets("aSHEET").Delete
    Application.DisplayAlerts = True
End Sub
 
Upvote 0
Your welcome but just remember I have taken a chance on what you have in those so called blank cells as you haven't stated or shown the formula (I can tell you have a formula because of the error triangles which in itself is a bit concerning).

I am assuming it is the same formula as is in R14? copied/dragged down which is giving an empty string i.e. "" (note: an empty string isn't a blank cell, they are 2 different things).

For future reference when posting on the board have a look at my signature block for some ways of posting usable screenshots, as in general a lot of posters won't answer questions with images that can't be copied into Excel as they don't want to waste their time re-typing data to test on (they just move on to another thread :eek:)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,007
Members
448,935
Latest member
ijat

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top