Solved

excel vbs: fill column B with values of column A if B is empty

Posted on 2011-02-11
3
292 Views
Last Modified: 2012-05-11
Dear Experts,

In an excel sheet I have values in seperate columns that need combined in that sense that if the cell in column B is empty the value of columnA 1 is filled in.
 I need to end up with 1 column ...

So that this:
12/03/2011 8:00      12/03/2011 18:00
12/03/2011 8:00      12/03/2011 18:00
12/03/2011 8:00      
12/03/2011 8:00      
12/03/2011 8:00      
12/03/2011 8:00      
12/03/2011 8:00      
12/03/2011 8:00      
12/03/2011 8:00      12/03/2011 18:01
12/03/2011 1:00      
12/03/2011 1:00      
12/03/2011 1:00      
12/03/2011 1:00      
12/03/2011 1:00      
12/03/2011 1:00      
12/03/2011 1:00      
12/03/2011 8:00      12/03/2011 16:15


Becomes that:

12/03/2011 8:00      12/03/2011 18:00
12/03/2011 8:00      12/03/2011 18:00
12/03/2011 8:00      12/03/2011 8:00
12/03/2011 8:00      12/03/2011 8:00
12/03/2011 8:00      12/03/2011 8:00
12/03/2011 8:00      12/03/2011 8:00
12/03/2011 8:00      12/03/2011 8:00
12/03/2011 8:00      12/03/2011 8:00
12/03/2011 8:00      12/03/2011 18:01
12/03/2011 1:00      12/03/2011 1:00
12/03/2011 1:00      12/03/2011 1:00
12/03/2011 1:00      12/03/2011 1:00
12/03/2011 1:00      12/03/2011 1:00
12/03/2011 1:00      12/03/2011 1:00
12/03/2011 1:00      12/03/2011 1:00
12/03/2011 1:00      12/03/2011 1:00
12/03/2011 8:00      12/03/2011 16:15


Please have a look into this.
Many thanks in advance.
0
Comment
Question by:Watnog
  • 2
3 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
Comment Utility
You could use another column with formulas:
=if(B1="",A1,B1)
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
Comment Utility
Or select column B, press f5, click the Special button, then choose Blanks from the list and press OK. Now press = then the left arrow then Ctrl+Enter.
0
 

Author Closing Comment

by:Watnog
Comment Utility
Excellent.
Thank you.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now