ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Looking for a column heading and using the column position (https://www.excelbanter.com/excel-programming/359384-looking-column-heading-using-column-position.html)

drucey[_29_]

Looking for a column heading and using the column position
 

Excel people, you are amazing.

So...

Thanks to many people here, i have managed to open a file in excel,
trim it down, find the data i want, select it, copy it, extract the
date..

Now what i'd love to do is:

Look at the date in the file. (Cell F1)
Look at the TillNumber it came from. (Cell F2)
Go back into the main workbook (Stores.xls) and then into the worksheet
based on which till - ie. Worksheets are called Till01, Till02 upto Till
08. Cell F2 in the opened Cap File has which till it is in single figure
format. ie. Just "2"
Look across Row 3, find which column has the date in.

Then paste the data (in the clipboard already) into Column with the
correct date in, and the Row which i've named "Zero"

I've tried, and tried, but i can't get anything to work!
I realise i'm asking quite a few questions on here, i am trying but
it's not always working!
Thank you


--
drucey
------------------------------------------------------------------------
drucey's Profile: http://www.excelforum.com/member.php...o&userid=32553
View this thread: http://www.excelforum.com/showthread...hreadid=534529


drucey[_30_]

Looking for a column heading and using the column position
 

Nearly got there!


Code
-------------------
'In main workbook, find which column to paste data into
Windows("Stores.xls").Activate
Sheets("Till0" & TillNumber).Select
Range("A1").Select

'Search for the Cap Date
Cells.Find(What:=CapDate, LookIn:=xlFormulas, SearchFormat:=False).Activate
Dim CapDateCol As Range
CapDateCol = ActiveCell.Colum
-------------------


The only thing i can't do is go to a certain cell to paste in my data.

I'm in the correct column after doing the search.

I just need to go down to a row named "Zero"

Any ideas?
Thanks

--
druce
-----------------------------------------------------------------------
drucey's Profile: http://www.excelforum.com/member.php...fo&userid=3255
View this thread: http://www.excelforum.com/showthread.php?threadid=53452


drucey[_31_]

Looking for a column heading and using the column position
 

Nearly got there!


Code:
--------------------
'In main workbook, find which column to paste data into
Windows("Stores.xls").Activate
Sheets("Till0" & TillNumber).Select
Range("A1").Select

'Search for the Cap Date
Cells.Find(What:=CapDate, LookIn:=xlFormulas, SearchFormat:=False).Activate
Dim CapDateCol As Range
CapDateCol = ActiveCell.Column
--------------------


The only thing i can't do is go to a certain cell to paste in my data.

I'm in the correct column after doing the search.

I just need to go down to a row named "Zero"

Any ideas?
Thanks!


--
drucey
------------------------------------------------------------------------
drucey's Profile: http://www.excelforum.com/member.php...o&userid=32553
View this thread: http://www.excelforum.com/showthread...hreadid=534529



All times are GMT +1. The time now is 04:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com