Excel VBA - Move data based on column

longtimelurker

New Member
Joined
Feb 9, 2014
Messages
13
Hi Guys,

Long time lurker here (^_^)

I have been getting by for a year or so now but in need of some help :)

At work, I have columns under specific names at a random row. "Description" is a header name for example.

I need everything under Description to go to (C:2) in sheet2

I am trying to have excel search by name, aka Description in sheet 1, then move all data under it to C:2

(there are 10 other headers)

So that's really it :) Because it's random row, I can no longer use hard code :(

Feel free to ask any questions, or if pictures are needed, etc ask away!

Thank you Mrexcel forums.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
melurker,

What version of Excel and Windows are you using?

if pictures are needed

Pictures/graphics will not work.


1. Are all the titles in any one worksheet, in different rows?

2. Or, are the titles in any one worksheet, in the same row?

3. Or, can the title rows be in different rows in different worksheets?

4. Can we have screenshots of several worksheets?

5. If you have a Summary worksheet, can we have a screenshot of that also (manually formatted by you for the results you are looking for)?


To post your data, you can download and install one of the following two programs:
Excel Jeanie
MrExcel HTML Maker

Or, when using Internet Explorer, just put borders around your data in Excel and copy those cells into your post.
See reply #2 the BLUE text in the following link:
http://www.mrexcel.com/forum/about-board/444901-how-create-table-like-aladin.html#post2198045


If you are not able to give us screenshots:
You can upload your workbook to Box Net,
sensitive data changed
mark the workbook for sharing
and provide us with a link to your workbook.
 
Upvote 0
As I'm not a VB master, As long as there is some sort of consistency I would just record a macro using remove blanks, dunno if that would fit your dilema
 
Upvote 0
melurker,

What version of Excel and Windows are you using?



Pictures/graphics will not work.


1. Are all the titles in any one worksheet, in different rows?

2. Or, are the titles in any one worksheet, in the same row?

3. Or, can the title rows be in different rows in different worksheets?

4. Can we have screenshots of several worksheets?

5. If you have a Summary worksheet, can we have a screenshot of that also (manually formatted by you for the results you are looking for)?


To post your data, you can download and install one of the following two programs:
Excel Jeanie
MrExcel HTML Maker

Or, when using Internet Explorer, just put borders around your data in Excel and copy those cells into your post.
See reply #2 the BLUE text in the following link:
http://www.mrexcel.com/forum/about-board/444901-how-create-table-like-aladin.html#post2198045


If you are not able to give us screenshots:
You can upload your workbook to Box Net,
sensitive data changed
mark the workbook for sharing
and provide us with a link to your workbook.


longtimelurker,

Sorry about that, when I pasted in your Site ID/handle/User Name, I cut off some of it by mistake.
 
Upvote 0
Hi!

thank you for the reply :)

https://app.box.com/s/sva96q0kjpw5w6ab0gyf
I used Box Net, so feel free to take a look whenever you get time, greatly appreciated hiker95 :)

There is a README Sheet as well, but to put into better words:

The columns from sheet labelled "QUOTE" are put into Sheet1 columns with the same name.

Issue is, sometimes the column names aren't always in the same place, sometimes the description may be in column E etc, so I am trying to find a way
that it collects data from the column name instead of exact locations (because they aren't always there)

Thank you very much for any and all help, you're all amazing on this forum, at least a years worth of help so far :) thank you!!

https://app.box.com/s/sva96q0kjpw5w6ab0gyf
 
Upvote 0
longtimelurker,

I am getting an error when trying to down load both your workbooks. Excel found unreadable content in 'Book1.xlsx'. Do you want to recover the content of this workbook? If you trust the source of this workbook, click Yes.

Can you try again with a much smaller workbook?


You may want to see this thread reply #6 for how the range object is used:
http://www.mrexcel.com/forum/excel-...how-add-multiple-sheet-data-single-sheet.html

For the above you will have to scroll down a lot.
 
Last edited:
Upvote 0
Hi Hiker95!

Thank you for dealing with me mistakes so far, I decided screenshots should be better :)

Sheets are named:
QUOTE and Sheet1

Data from quote goes to Sheet1

I'm not sure if it's impossible, but I'm hoping to be able to fetch data from specific columns in QUOTE and send them to their appropriate columns in Sheet1

In "QUOTE" they are always row 1, but sometimes a different order.
Sheet1 always remains the same :)

QUOTE:
QXU9BCi.png


Sheet1:
kd1CnXp.png


Thank you for any and all help, you're all amazing! :D

if links are better:
imgur: the simple image sharer - QUOTE
imgur: the simple image sharer - Sheet1
 
Upvote 0
longtimelurker,

You are posting pictures/graphics. This means that if this was a problem where one needed to use your data, anyone trying to help you would have to enter the data manually. That makes no sense.

I will need to see a workbook with both worksheets.

You can upload your workbook to Box Net,
sensitive data changed
mark the workbook for sharing
and provide us with a link to your workbook.
 
Upvote 0
longtimelurker,

Same message on both files.

I do not need files that are that big.

I need a file with several worksheets where the titles are in different columns, and, the Summary/resulting worksheet with the titles in the correct positions.

Are we only looking for 8 titles?

Are the titles in all worksheets in the same row?

Can I assume that in each raw data worksheet, that the last row in each column has the same last row?
 
Upvote 0

Forum statistics

Threads
1,214,563
Messages
6,120,248
Members
448,952
Latest member
kjurney

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top