Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
PattiP
 
Posts: n/a
Default Sending Data to Access Database

I have a spreadsheet for hourly energy sales and purchases. The spreadsheet
is set up something like this:

"Date, Company, ScheduleType, HourEnding1, HourEnding2,....HE24" across the
top of the sheet. I have a section for sales and a section for purchases
where the Megawatts (MW) sold or purchased are entered under each hour for
each transaction.
In another area of the spreadsheet I have a similar setup where the prices
are entered. I will eventually calculate the HE1 MW * HE1 price for each
transaction, but would like do all that in Access. Howver, instead of having
over 50 fields (ie, HE1MW, HE1price, HE2MW, HE2price....) I would like to
set up the Access database something like this:

"Date, HourEnding, Company, ScheduleType, Megawatt, Price" so that each
company/schedule type could have up to 24 records, 1 for each hour. Is
there a way to get the Excel data into a useable format to transfer the data
into ACCESS?

I guess one question I have that co-workers have asked me is: is it wrong to
have 50+ fields in my database?? I know there's always more than one way to
do things and I think it could be do-able but seems very cumbersome and not
the "right way" to do it based on previous database training that I've had.


--
Patti
  #2   Report Post  
Posted to microsoft.public.excel.misc
bpeltzer
 
Posts: n/a
Default Sending Data to Access Database

To me, the latter is easier to query. But I wouldn't get to concerned about
either approach.
If you do want to convert from 50 fields to 5, you can use the offset
function to take appropriate steps through the data. If your existing data
(sheet1) has 3 'header' columns, followed by 24 hourly columns, and your new
layout (sheet2) should have the 3 headers, plus a column indicating the hour
and a column for the value...
Sheet2 would have the headers in row 1. In A2:
=OFFSET(Sheet1!A$1,CEILING((ROW()-1)/24,1),0). Autofill that into B2 and C2.
In D2: =MOD(ROW()-2,24)+1. And in E2:
=OFFSET(Sheet1!C$1,CEILING((ROW()-1)/24,1),D2). You can autofill those
formulas through as many rows as you need to restructure the data.


"PattiP" wrote:

I have a spreadsheet for hourly energy sales and purchases. The spreadsheet
is set up something like this:

"Date, Company, ScheduleType, HourEnding1, HourEnding2,....HE24" across the
top of the sheet. I have a section for sales and a section for purchases
where the Megawatts (MW) sold or purchased are entered under each hour for
each transaction.
In another area of the spreadsheet I have a similar setup where the prices
are entered. I will eventually calculate the HE1 MW * HE1 price for each
transaction, but would like do all that in Access. Howver, instead of having
over 50 fields (ie, HE1MW, HE1price, HE2MW, HE2price....) I would like to
set up the Access database something like this:

"Date, HourEnding, Company, ScheduleType, Megawatt, Price" so that each
company/schedule type could have up to 24 records, 1 for each hour. Is
there a way to get the Excel data into a useable format to transfer the data
into ACCESS?

I guess one question I have that co-workers have asked me is: is it wrong to
have 50+ fields in my database?? I know there's always more than one way to
do things and I think it could be do-able but seems very cumbersome and not
the "right way" to do it based on previous database training that I've had.


--
Patti

Reply
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
Conditional Formatting not applied to data exported from Access Mark A Excel Worksheet Functions 5 October 24th 05 12:11 PM
How to import data from a password protected Access DB into Excel. Agus Excel Discussion (Misc queries) 0 October 12th 05 05:42 PM
Printing data validation scenarios SJC Excel Worksheet Functions 14 July 24th 05 12:43 AM
Querying Data from Access Stefan Excel Discussion (Misc queries) 2 June 2nd 05 07:10 PM
my data truncates when ported from access to excel Confused access user Excel Worksheet Functions 4 May 13th 05 03:50 AM


All times are GMT +1. The time now is 10:06 PM.

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"