Solved

Excel macro needed

Posted on 2014-01-13
9
348 Views
Last Modified: 2014-01-28
Hi ,

I need a help in writing a macro to do my daily jobs.

Please find the input and desired output.

The column names in sheet1 is transposed in column 2 .

So the data value in sheet 1 need to match the corresponding columns in sheet 2.

Thank you .
sample.xlsx
0
Comment
Question by:magento
  • 4
  • 4
9 Comments
 
LVL 26

Assisted Solution

by:Shaun Kline
Shaun Kline earned 250 total points
ID: 39776800
If your desire is to simply transpose a row to columns (or vice versa), have you tried just recording a macro while performing this task? It will give you a base to start for modifications, if needed.
0
 
LVL 5

Author Comment

by:magento
ID: 39777099
Yes, i tried the idea .

But the problem is that some time one of the fields is missing. For example sometimes there will be no phone number. And hence the recorded macro not providing exact result.

So i was asked for macro  which should be able to recognize the field title and paste information if available.
0
 
LVL 45

Expert Comment

by:aikimark
ID: 39781278
is the phone number data the only data that will possibly be missing?
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 5

Author Comment

by:magento
ID: 39784561
Hi,

Most of the time , the phone number only missing.

Is it possible for write macro for any missing columns and accomodate that ?

Thanks
0
 
LVL 45

Accepted Solution

by:
aikimark earned 250 total points
ID: 39785618
The simplest approach would be first to insert a phone number row in the sections where it is missing and then to do the cell copy with transpose.

If there are more (than phone numbers) possible missing data, then you will need to specify all the possible missing data names.
0
 
LVL 5

Author Comment

by:magento
ID: 39787644
Thanks for ur reply.

But this takes me time to do for many times and hence i prefer only macro .
0
 
LVL 45

Expert Comment

by:aikimark
ID: 39788651
a macro can do this, but you haven't supplied enough detail for a macro that would likely solve your problem completely.
0
 
LVL 5

Author Comment

by:magento
ID: 39788762
Hi,

As per the attached sample file in my original post, i need a macro which run thru sheet 1 and paste the values in sheet2 based on the variable names in sheet1(columnA)

Thanks
0
 
LVL 45

Expert Comment

by:aikimark
ID: 39789245
@magento

Per your prior comment, if the phone number is not the only possible missing row data, then what are the mappings?  It looks like the row header might be stripped of its trailing colon character (:) and possibly be matched with the column headers, but that is an assumption on my part.  This kind of detailed problem statement is what the experts need.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

777 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