Solved

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

Posted on 2011-02-11
3
296 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 85

Expert Comment

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

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 34871277
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
ID: 34871394
Excellent.
Thank you.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

749 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