ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding 3rd shift data when missing (https://www.excelbanter.com/excel-programming/302934-adding-3rd-shift-data-when-missing.html)

dm7582

Adding 3rd shift data when missing
 
First time poster, this looks like a great forum. I have some V
experience, but I can't seem to figure out anything that will m
problem. I have data that I qeury out of a database, that is dail
production data. I want to apply it to some tables in excel to fin
some trends. My problem is sometimes not all shifts run everyday i
every catagory. So I end up with shift 1 & 2 and no 3rd shift. I wan
to make a macro that checks for all three shifts and if one isn'
present inputs it with zero values

--
Message posted from http://www.ExcelForum.com


dm7582[_2_]

Adding 3rd shift data when missing
 
Do I need to explain this better? :confused

--
Message posted from http://www.ExcelForum.com


Jamie Collins

Adding 3rd shift data when missing
 
dm7582 wrote ...

Do I need to explain this better? :confused:


Some more details would be great.

Based on what was posted, I can only speak in rather abstract terms.
Software development is about modelling reality. In your reality you
have a Shift1, a Shift2, and a Shift3. In your database (your model)
you have a table that has recorded Shift1 and Shift3. Your databases
needs to know that Shift2 exists before it can tell you it is absent
from a given data set.

Sounds like your database needs a 'Shifts' table i.e. something that
has tells it what all the valid shifts are. Chances are it should be,
or additionally should have, a 'Calendar' table e.g. to show there are
no shifts in Region1 on Christmas day etc.

Just a stab in the dark really.

Jamie.

--

dm7582[_3_]

Adding 3rd shift data when missing
 
Thank you for your response Jamie,

Unfortunately I don't control the database, so I can't experiment wit
it; I can just run queries off of the data.

Basically When I query the Data and sort and subtotal it my problem i
as follows:

Mach # Shift Date Units Mins
500 1 1/1/04 5936 193
2 1/1/04 3027 134
Total 8936 327
500 1 1/2/04 1000 100
2 1/2/04 2000 125
3 1/2/04 3000 150
Total 6000

This would be an example of my problem where on the 1st 2 shifts wher
ran and on the 2nd 3 shifts where ran. What I am trying to do is creat
a Marco that recognizes that a shift is missing and inserts a blank ro
in that place where the shift is missing. Or is there a way in Acces
to have Access insert this

--
Message posted from http://www.ExcelForum.com


dm7582[_4_]

Adding 3rd shift data when missing
 
Does this make sense

--
Message posted from http://www.ExcelForum.com


dm7582[_5_]

Adding 3rd shift data when missing
 
I think this will make this simpler want I want to do is write a macr
that inserts a row if the data doesn't go
1
2
3

Show if the data went

1
2
1
The macro would insert a row where the missing three should be

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 01:47 PM.

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