Finding/lookingup and copying a column from one sheet to another

ErinRV

New Member
Joined
Jun 10, 2016
Messages
3
I am importing a spreadsheet that has multiple columns (# of columns changes every time i import it). I would like to find a specific title i.e. 'Item Total" within row A and have this entire column transferred into a different sheet. I've played with Exact,Match and lookup... but just can't seem to get anything to work. Please help!!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Try:
Code:
Sub CopyCol()
    Application.ScreenUpdating = False
    Dim LastRow As Long
    LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    Dim ColName As Range
    Set ColName = ActiveSheet.Rows(1).Find("Item Total", LookIn:=xlValues, lookat:=xlWhole)
    If Not ColName Is Nothing Then
        ColName.EntireColumn.Copy Sheets("Sheet2").Cells(1, 1)
    End If
    Application.ScreenUpdating = True
End Sub
 
Upvote 0
Hi ErinRV,

I am not able to understand what exactly do you want. Could you please be a bit more elaborate.
 
Upvote 0
Thanks so much and I'm sure this would work... but I'm using Google spreadsheet and I don't believe it supports VBA code, at least not that i know...
 
Upvote 0
Unfortunately, I'm not familiar with Google spreadsheet.
 
Upvote 0
I have a spread sheet that changes weekly. I import this spreadsheet into a sheet titled RawData. Row A in this sheet has titles of all sorts, these titles change depending upon which data is provided/exported (I can't control this). One of the columns is titled "Item Total", but I never know which column it will be in. How can I create a formula that will find this column and transfer it into a new sheet? I am using Google Spreadsheets...
 
Upvote 0

Forum statistics

Threads
1,216,761
Messages
6,132,572
Members
449,736
Latest member
anthx

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