Counting reason loop

Status
Not open for further replies.

GexcelG

New Member
Joined
May 15, 2018
Messages
7
Hi,


I have a continuously (once a day) updating database that looks like this:
Machine`Minor StopsMalfunctionMalfunction TypeMinor StopsMalfunctionMalfunction Type
1A1111111100 11110.70.5002.80A
2A1110.5110.5110 1110.5110.5110
3A1110010004A 1111000004B
4A0001111103B 0001111103B
1B0000000000Dual use 0000000000Dual use
2B0000000000Dual use 0000000000Dual use
5B1111111100 1111111100
6B1110.5110.5110 1110.5110.5110
7B1110010004A 1111111100
8B0.70.80.9110.70.60.71.60 0.70.80.9110.70.60.71.60
9B1111111100 1111111100

<colgroup><col><col span="5"><col span="6"><col><col span="12"></colgroup><tbody>
</tbody>
I am trying to create a loop that will give me the summary of machine malfunctions by type.
Assume that the database is full and based on the following logic:
1. The first cell in the row is the machine number/ name
2. Each shift is 8 hours long.
3. For each shift there’s an indication per hour of machine utilization:
a. First 8 cells are the machine operating capacity (Number between 0 to 1).
b. The next cell (9th) is minor stoppages (the amount of hours the machine did not work at full capacity, usually a fracture. E.g. 1 in the second row, or 1.6 in machine 8B).
c. Alternatively if the machine experienced a malfunction the 10th cell will sum the number of idle hours the machine stood idle, and the 11th cell will specify the reason (from a closed list of reasons).
4. These 11 cells will repeat themselves for every shift
5. Some machines appear twice (1A 1B) but only one of them is relevant, next to other it states “dual use” – so to know that the machine was not idle but used in another line

I want the loop to create the following summary table:

1AA2.8
2AMinor1
3AA4
B4
4AB6
1BDUAL USE
2BDUAL USE
5B(none)
6BMinor2
7BA4
8BMinor3.2
9B

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>


Thank you so much!
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
31,976
Office Version
365
Platform
Windows
Duplicated https://www.mrexcel.com/forum/excel-questions/1057165-scan-through-loop.html#post5076217

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).

Note that sometimes posts from new users require Moderator approval before you can see them on the public forums. When this happens, you should see a message to that effect when you try to post it.
Please be patient and do not attempt to post the question again.
 
Status
Not open for further replies.

Forum statistics

Threads
1,081,523
Messages
5,359,263
Members
400,523
Latest member
ExcelNewbie98

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top