Solved

Excel macro needed

Posted on 2014-01-13
9
328 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 25

Assisted Solution

by:Shaun Kline
Shaun Kline earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
is the phone number data the only data that will possibly be missing?
0
 
LVL 5

Author Comment

by:magento
Comment Utility
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 45

Accepted Solution

by:
aikimark earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
@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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
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.

763 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

7 Experts available now in Live!

Get 1:1 Help Now