LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need data in cells on one row extracted to multiple rows

On May 23, 11:38 am, Joel wrote:
Give more info on format of spreadsheet.
1)Which column has the date
2)Which columns need to be repeated on new rows besides date.
3) which columns have the sale catorgories.



" wrote:
I am very new to VBA, but I have quite a bit of experience in Excel.
I have data in multiple cells on one row of a spreadsheet that I need
to extract and place on multiple rows (in a new worksheet). My
situation is this: I get a "daily sales report" with one row for each
day. On each row are numbers from different sales categories. I need
to create an import file to get this info into the accounting
system...this requires me to take each of those categories and make a
separate row for each one but using the same date as the row from
which they were extracted. Does anyone know how I should approach
this? What function do I use? I just need a lead to help me get
started. Thanks.- Hide quoted text -


- Show quoted text -


One thing I failed to mention earlier is that I want this whole
operation to begin by selecting only the rows from the first worksheet
that fall between two dates - it needs to ask for those two dates.
Here's the code I found on a website I thought I would start with.
NOTE: I DID NOT WRITE THIS CODE, nor could I even if I wanted to (not
yet at least):

Sub Import_File()

' Purpose: (1) create new worksheet _
(2) copy data in one row (rows determined by date) _
(3) past data in multiple rows in correct columns _
(4) fill other columns with constant info _
(5) take user input (trans #) -- past that into
correct cells

' Ok, all of what is below, I copied from a website _
It's supposed to allow me to enter dates for it to look for.

Dim startDate As String, stopDate As String, startCel As Integer,
stopCel As Integer, dateRange As Range
On Error Resume Next
Do
startDate = InputBox("Please enter Start Date: Format(mm/dd/yy)",
"START DATE")
If startDate = "" Then End
Loop Until startDate = Format(startDate, "mm/dd/yy") _
Or startDate = Format(startDate, "m/d/yy")
Do
stopDate = InputBox("Please enter Stop Date: Format(mm/dd/yy)",
"STOP DATE")
If stopDate = "" Then End
Loop Until stopDate = Format(stopDate, "mm/dd/yy") _
Or stopDate = Format(stopDate, "m/d/yy")
startDate = Format(startDate, "mm/dd/yy")
stopDate = Format(stopDate, "mm/dd/yy")
startCel = Sheets(1).Columns(1).Find(startDate, LookIn:=xlValues,
lookat:=xlWhole).Row
stopCel = Sheets(1).Columns(1).Find(stopDate, LookIn:=xlValues,
lookat:=xlWhole).Row

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need data in cells on one row extracted to multiple rows [email protected] Excel Programming 0 May 23rd 07 08:21 PM
Need data in cells on one row extracted to multiple rows [email protected] Excel Programming 0 May 23rd 07 08:20 PM
Need data in cells on one row extracted to multiple rows [email protected] Excel Programming 0 May 23rd 07 08:20 PM
Need data in cells on one row extracted to multiple rows [email protected] Excel Programming 1 May 23rd 07 04:38 PM
I need to move the data from certain cells in multiple positions (different columns & rows) into a single row, then repeat. objRobertMitchell Excel Programming 4 October 6th 06 04:08 AM


All times are GMT +1. The time now is 12:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"