Replace blank cell in between cell

manggo

New Member
Joined
Jul 29, 2017
Messages
18
Dear Forum
Master and Excel Expert

I need your help please.

I have dataset
https://drive.google.com/open?id=0BwUNg-SBvMSwRnFSTkZTczJyakk

How to set the formula on Column H I J K ?

Your help is very appreciate.

Thank you

=====
On text format like this :
ORIGINAL:
=======================
CASE_ID,1ST ,2ND ,3RD ,4TH
1,1,,4,4
2,2,1,,4
3,6,10,7,8
4,,3,5,5
5,,6,4,4
6,,,4,5
7,,,9,6
8,8,7,6,10
9,7,2,4,6
10,8,,,3
11,4,,,9
12,9,3,7,1
13,,,,2
14,,,,2
15,7,2,10,9
16,2,10,4,9
17,4,8,7,5
18,,,,2
19,,,,7
20,7,5,10,10

==================
AFTER:
CASE_ID,1ST ,2ND ,3RD ,4TH
1,1,4,4
2,2,1,4
3,6,10,7,8
4,3,5,5
5,6,4,4
6,4,5
7,9,6
8,8,7,6,10
9,7,2,4,6
10,8,3
11,4,9
12,9,3,7,1
13,2
14,2
15,7,2,10,9
16,2,10,4,9
17,4,8,7,5
18,2
19,7
20,7,5,10,10


Manggo
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
VBA would be a better option and the data can then be modified insitu rather than creating another table !!
 
Upvote 0
Do you really need "live" formula for columns "H:L"? If not, select Columns A:E and press CTRL+C to copy them... then select cell H1 and press CTRL+V to paste them at that location... with the pasted values still selected, press the F5 key and then click the "Special" button... select "Blanks" on the dialog page the appears and then click the OK button... click the down arrow on the Delete button on the Ribbon (Home tab, Cells panel) and click the "Delete Cells" item... select the "Shift cells left" option button and click the OK button... you are done.

If you wanted to create this second table using a VBA macro instead...
Code:
[table="width: 500"]
[tr]
	[td]Sub DeleteBlanksMoveDateLeft()
  Range("A1").CurrentRegion.Copy Range("H1")
  Range("H1").CurrentRegion.SpecialCells(xlBlanks).Delete xlShiftToLeft
End Sub[/td]
[/tr]
[/table]

HOW TO INSTALL MACROs
------------------------------------
If you are new to macros, they are easy to install and use. To install it, simply press ALT+F11 to go into the VB editor and, once there, click Insert/Module on its menu bar, then copy/paste the above code into the code window that just opened up. That's it.... you are done. To use the macro, go back to the worksheet with your data on it and press ALT+F8, select the macro name (DeleteBlanksMoveDateLeft) from the list that appears and click the Run button. The macro will execute and perform the action(s) you asked for. If you will need to do this again in this same workbook, and if you are using XL2007 or above, make sure you save your file as an "Excel Macro-Enabled Workbook (*.xlsm) and answer the "do you want to enable macros" question as "Yes" or "OK" (depending on the button label for your version of Excel) the next time you open your workbook.
 
Last edited:
Upvote 0
Dear Rick Rothstein

Wow. Its worked.
Both Copy Paste F5 and with your Macro.
Safe my time on cleaning my data.

Thanks indeed for your help

manggo
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

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