Macro For Merge And Centre The Data In Column

Feb 26, 2009

I have data like Below Mentioned in column A and Column B.I Want to Merge
and Center the Data in Column based on column A.

For example; I want to Combine the Cell i.e b2 and b3,B4 to B7,No Need to merge B8 Because A8 have a Same name But Differnet City. and so no.

I need a Macro.I have 6000 data in one sheet.I have 18 Sheets like this

DEALER NAME
A M MOTORS MALLAPURAM8
A M MOTORS MALLAPURAM
AALIANZ AUTOMOBILES NEW DELHI7.35
AALIANZ AUTOMOBILES NEW DELHI
AALIANZ AUTOMOBILES NEW DELHI
AALIANZ AUTOMOBILES NEW DELHI
AALIANZ AUTOMOBILES Noida15
ABHARAN MOTORS UDUPI7.88
ABT MARUTI CHENNAI7.89
ABT MARUTI CHENNAI
ABT MARUTI CHENNAI
ABT MARUTI CHENNAI
ABT MARUTI CHENNAI..................

View 9 Replies


ADVERTISEMENT

Centre Columns In Macro

Nov 9, 2006

I may be being a bit of a tool here, but I can't find a way to centre colums without selecting the columns (ie using with selection, centre, end with). I've written some variations below, none of which work.

Sheets("Journal").Columns(6).HorizontalAlignment = x1HAlignCenter

or

Range("F:F").HorizontalAlignment = x1Center

View 3 Replies View Related

Merge Two Workbooks. Copy Column Data Based On Numerical ID Match Of Another Column.

Mar 13, 2009

I am trying to get excel to search a workbook/(or worksheet if easier) for a matching unique value and fill in its associated data. My first workbook has the SKU (A) filled in but not the UPC (B). My second workbook has both the SKU (A) and the matching UPC (C) filled in.

I need to take both workbooks/(worksheets), compare the SKUs, and if a matching SKU is found, extract the UPC from Workbook 2 and fill in the UPC field in Workbook 1, and if no UPC is present in Workbook 2, then it leaves the cell in Workbook 1 blank.

View 2 Replies View Related

VBA Macro To Create Multiple Workbooks From One Master Workbook By Cost Centre

Jun 27, 2013

VBA Macro to work through a worksheet that consist of static data (tab 4) cost centres and to populate a new work book per cost centre consisting of three tabs for every cost centre found in the static data.

The master Workbook has the following tabs:

Tab 1 is called travel and consist of column a which is the cost centre number (plus 14 other columns)

Tab 2 is called Mobile and consist of column a which is the cost centre number (plus 14 other columns)

Tab 3 is called Expenses. and consist of column a which is the cost centre number (plus 14 other columns)

Tab 4 Static Date column 1 cost centre number and consist of column 1 which is the cost centre number (plus 14 other columns).

If no information found on a specific cost centre, the tab will include the headers and return the words "No transactions for this period"

Whilst splitting data into Tabs the workbooks should check against the Static Data table and include cost center description in Column B of each tab in the new workbook.

If master workbook consist of the following....

Tab 1 is called travel and consist of column 1 which is the cost centre number (plus 14 other columns), cost centres, 555,557,

Tab 2 is called Mobile column 1 cost centre number and consist of column 1 which is the cost centre number (plus 14 other columns) cost centres, 555, 78689,

Tab 3 is called Expenses. column 1 cost centre number and consist of column 1 which is the cost centre number (plus 14 other columns), cost centres, 555,

tab 4 Static Date - column 1 cost centre number and consist of column 1 which is the cost centre number (plus 14 other columns). cost centres, 555, 557,78689

It should output 3 workbooks by cost centre number.

One for 555, which consists of 3 tabs, travel, mobile and expenses.

A second for 557 which has 3 tabs travel, mobile and expenses, but only with data in the travel tab.

A third for 78689 which has 3 tabs travel, mobile and expenses, but only with data for mobile data.

The workbooks will be replicates of the contents within the tabs where column a wil be the cost centre plus 14 additional columns.

View 5 Replies View Related

Merge Column Of Data Into Row Of Another Table?

Jan 29, 2013

Basically, I need to merge the values in row A into specific rows in column D (as indicated by A1, A2, A3 etc).

View 6 Replies View Related

Merge Data Macro

May 25, 2007

I have been using the following code to fill data down a col. For example if a1=blue and a5=green and a7=red. The macro will fill a1(blue) down to a4, then take a5(green) to a6, then a7(red) etc.

Sub Filldown()
If ActiveCell.Text = "" Then
MsgBox "please start with a non-empty cell"
Exit Sub
End If
For Each x In Selection.Cells
If x.Text = "" Then
x.Value = x.Offset(-1, 0).Value
End If
Next x
End Sub

code works great, but I was hoping it could be changed so that instead of filling the data down it would merge the data down. So, in the example, a1:a4 would be merged leaving the word blue, a5:a6 merged, and a7:etc would be merged.
Is this possible?

View 3 Replies View Related

Merge Two Columns To Create 1 Column With All The Data

Mar 12, 2014

I have 2 columns full of information feeding from 2 different sources on our internet database

I would like to collect this information into 1 column to create a drop down list

As these are expanding tables feeding from the internet I don't think copy and paste into one column will work (I'm not sure about this but I would prefer a formula to avoid any issues).

View 4 Replies View Related

Merge Column Data Over Multiple Rows

Dec 6, 2008

I know how to merge data in a CSV (see attachment) from 2 columns into a single cell using =A1&" | "&B2 so that A1 (Safety Products) plus B1 (Fire Protection) becomes Safety Products | Fire Protection in cell C1, but how can I do this across multiple rows so that each pair of names is combined in each row? The job I'm working with is a product CSV file that has 6370 lines so I don't want to do them one line at a time!

View 2 Replies View Related

Macro To Merge Cell Without Losing Data

Jun 27, 2014

I am trying a macro to merge cell without losing the data until I find a next cell with the data - This merging should be pertain only for the column selected. Is it possible to write a macro and preform this activity.

View 1 Replies View Related

Macro To Merge Data From Multiple Worksheets

Jul 7, 2014

for creating the macro As I dont have any idea about macro.

My question is that I just want to marge all the tab into one tab however some header in all the tab are dirffernet however I need one header.

I have attached the example file, in that tab named as "OUTPUT" that is what I needed by macro.

View 14 Replies View Related

Merge Duplicate Cells Or Keep Duplicates In One Column If One Of Rows Has Data

Apr 7, 2014

I have a huge document that looks like this

Column A______Column B_____Column C
100/12__________B___________$
100/12______________________@
100/12______________________€
250/13______________________€
250/13______________________$

I want to keep in ColumnA all three rows of 100/12, because it has a value in Column B in one cell-which is the criteria, and remove the 250/13 because it has no value in cell B.

I was assuming that merging duplicates in column A, and than remove empty from ColumnB.

View 2 Replies View Related

Macro To Merge And Center Varied Range Of Data In Fixed Row

Jun 10, 2014

See attached the example worksheet. I am wondering if there is a way to write a macro that will change data from individual strings within a cell row to merged and centre data for that set of data. The issue is the data in the row will be varied i.e. sometimes there will be 20 x 2013 other times there may be 22 X 2013 etc. however, the data will always be fixed in the same row on the worksheet.

At the moment the best I have is a recorded macro, which really doesn't work too great and I end up fixing it constantly.

View 2 Replies View Related

How To Merge Several Column Cell With Data Into 1 Cell

Jun 26, 2014

Normally i have a row and data as below:

Item
Red
Comfortable
New
Car
1

and i would like to merge them into one cell like this(with spacing between them):

Item Red Comfortable New Car 1

Can VBA do this move?

View 4 Replies View Related

Centre Spreadsheet On Screen

Sep 27, 2013

I have a spreadsheet that has columns hidden from column Z to the end and rows hidden from row 50 to the end thus when viewing the spreadsheet the user sees the working area and hidden area in blue. What I would like to do is have the spreadsheet window minimize to the size of the spread sheet and also allow the user to drag the window around the screen. Is this possible if so do I need VBA Code.

View 1 Replies View Related

Shape With Hollow Centre

May 29, 2008

if it was possible to create a shape, such as a rectangle, with a hollow centre so you can see the cell positioned behind it? E.G. the shape could cover cells B3:D5 so you could see cell C4 through the hollow centre/gap?

View 6 Replies View Related

Way To Check Whether Any Cost Centre Has Been Missed Out ...

Nov 20, 2009

I attached a workbook and it shows data in row 2 - 960. and in cells BA1574 -BM1604 are the summary by using 'sum if' function. As you can see, row 160 countercheck the results and it shows differences.

So my questions are

1) any formula that i can use to ensure all cost centres are taken up in Col AZ1574 - AZ1604? I am sure that i have missed something out.

2) My goal is to summarise the total of each cost centre. Is there other options to reach this goal apart from using 'sum if' function? I would like to learn something new.

View 11 Replies View Related

Modify Code To Always Centre The Picture

Dec 3, 2008

I got this code from someone who is not currently available,
I modified it a little so that when I pick a picture it always lands on j96, but I need it to line up exactly on top of the picture underneath it
I have also attached a sample.
The pictures will always be exactly the same size

View 7 Replies View Related

Find Centre Of 6 Figure National Grid References

Feb 6, 2014

Is it possible to find the centre point of these 6 figure National Grid References (sample)

345723842214
346094842080
346087842611
346359842379
346502841967

These are point on a map - these points will vary and the number of point will vary too,

View 8 Replies View Related

Merge Two Columns To One Filled Column?

Jul 23, 2014

I have two columns that are the same field, both Middle Name. The first column does not have every single row filled and the second column has every row the first column does not have and vice versa. I want to merge them to one filled column.

View 2 Replies View Related

Concat Function: Merge 2 Column Together

Oct 29, 2008

how can merge 2 column together:

column time1 with text as 00:41
column time2 with text as 27

how can i merge it into a single cell in hh:mm:ss format , 00:41:27 ?

View 2 Replies View Related

Merge Cell Text From Different Column's And Row's

Apr 16, 2007

I want to merge cell text from different column's and row's into a empty cell using VBA and array. e.g (fName, lName, address, City)

I have seen many way's to merge cell text from same row.

View 4 Replies View Related

Merge Same Column From Multiple Files

Oct 12, 2007

I have hundreds and hundreds of excel files. but in every file, there is the same column lets say column D which has all the information I want. In stead of opening hundreds of worksheets and copying and pasting over the data into a new sheet. Is there a code I could write that would open all these files and copy the data from the same colum over into my new sheet? so column D in the first work book will copy to colulm A in the new work book. Then colum D in the second workboko will copy to the new worksheet in column B ect ect ect.

View 9 Replies View Related

Merge 2 Macro's Together

Jul 21, 2007

I have two macro's that I need merged together. Specifically, the macro Find75 is run first which produces a new sheet, Peaks Found, and then normally I would run the kTest macro to give the Final Results sheet. Need to get this all into one macro? Thus one macro to run would produce the final results sheet, without producing the intermittent step of producing the Peaks Found sheet.

View 2 Replies View Related

Variables- Spreadsheet That Calculates The Floor Area Of A New Build City Centre Hotel

Apr 3, 2009

heres the data: [url]

Im meant to produce a simple spreadsheet that calculates the floor area of a new build city centre hotel. The developer is looking at various plots of land that allow differing sizes of floor plates and storey heights. The key variables are the number and type of bedrooms, number of floors and whether the hotel is classed as a premium or budget hotel.

I need to produce a spreadsheet that shows the key variables and the total calculated floor area at the top of the sheet.

View 14 Replies View Related

Merge And Center Only Column Labels Of Pivot?

Feb 9, 2014

When I use "Merge & Center cells with Labels" of a pivot table, It is merging Column labels as well as row labels. Is there a workaround to apply this feature only for column labels and not for row labels.

View 2 Replies View Related

Merge Several Columns If Duplicates Exist In Column A

Apr 13, 2008

I have got a wordlist in worksheet "original" which looks like:

Before: [Code] .....

I need a macro which merges the columns B,C,D,E and F depending on if there are duplicates in Column A or not. If there are one two or more duplicates in column A,then those should be deleted and only one of them should remain in column A. The members of deleted duplicates in column B,C,D,E and F should be merged together. No duplicates should be made by the process of merging. Each member in column B,C,D,E and F has to be unique. The results are supposed to be put in worksheet "new".Columns B,C,E and F should be merged through signe "/". And Column D should be merged through signe ",".

After: [Code] ......

The macro must be able to deal with very large lists. biger than 200 000 words in column A

Here is the excel file containing the example : excel file

View 14 Replies View Related

VBA To Merge Cells Based On Other Column Values?

Mar 19, 2014

Now I know that merging cells is usually not a good thing in VBA, but I'm working on a data report that just looks bad unless longer pieces of text can span several cells to minimize column width.

So here's the problem:

I have a column of 1's and 0's in columns E and F, and text in Column G. I want to merge the cells in columns G and H for that specific row if there is a 1 in either the E or F column for that specific row. And I need to do this for a long range...rows 7-5000. Any ways that VBA can do this?

View 4 Replies View Related

Merge Columns B,C,D,E And F, If Duplicates Exist In Column A

Apr 13, 2008

i have got a wordlist in worksheet "original" which looks like:

Before:

View 14 Replies View Related

Delet Rows Duplicate In Column A & C And Merge B

Oct 28, 2009

i have to clean a worksheet from duplicat rows. The list looks like:

A---------B-----------C
a---------s-----------b
a---------f------------b
a---------s-----------b
a---------e-----------d
a---------d-----------v

Those rows have to be deleted where duplicates exist in column A and C. In our example the first three rows would meet the criteria and two of them have to be deleted. Content of Column B has to be merged with ";" but without duplicates. The result would then look like:

A---------B-----------C
a---------s;f----------b
a---------e-----------d
a---------d-----------v

View 2 Replies View Related

Merge Duplicate Rows And Sum One Column - VBA Code?

Jun 2, 2012

In a big data sometimes I have identical rows (maybe the 'Quantity' column has different value). I would like to merge them into one and add the quantities together. I have to use B and C (I need both) to find out if these rows are identical.

For example:
A1=date B1=111222 C1=ABCD ... and G1=quantity (1)
A2=date B2=111222 C2=ABC ... and G2=quantity (1)
A3=date B3=111222 C3=ABCD ... and G3=quantity (2)[code]......

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved