Find Delay…

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
2,422
Office Version
  1. 2010
Using Excel 2010
Hello,

Here is example of 30 rows from C6:P35 every week will be added 1 row below 35….

I want VBA or formula 3 row below of the last data row fid delay of 1, X and 2 signs…in this example T1 has delay for 1=0, for X=1 and for 2=2…. example T2 has delay for 1=6, for X=0 and for 2=1….and so on for T3 to T14.

Note:--1st formula can set find delay max 24 draw back from 0, 2nd always 3 row below of the last data row.

Find Delay.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZ
4
5T1T2T3T4T5T6T7T8T9T10T11T12T13T14
630XX222X112XX221
729X2211X11112X11
828X122221121211X
92711111XX1X2X221
102611211112111211
11251X1X1211X21221
1224112111112111X1
13231X11121X112211
1422X1X1XX21121211Here is example of 30 rows from C6:P35 every week will be added 1 row below 35…. I want VBA or formula 3 row below of the last data row fid delay of 1, X and 2 signs…in this example T1 has delay for 1=0, for X=1 and for 2=2…. example T2 has delay for 1=6, for X=0 and for 2=1….and so on for T3 to T14. Note:--1st formula can set find delay max 24 draw back from 0, 2nd always 3 row below of the last data row.
15211XX21X2XX12221
1620XX21X2111X2212
1719221X22211X1211
18182XX1X1X2X12121
1917X2X11X11X112X2
20151XX221X1X22211
2114XX222X112XX221
2213X2211X11112X11
2312X122221121211X
241111111XX1X2X221
251011211112111211
2691X1X1211X21221
278112111112111X1
2871X11121X112211
296X1X1XX21121211
3051XX21X2XX12221
314XX21X2111X2212
323221X22211X1211
3322XX1X1X2X12121
341X2X11X11X112X2
3501XX221X1X22211
36
37
38T1T2T3T4T5T6T7T8T9T10T11T12T13T14
39Delay106311010311200
40DelayX10032105031113112
41Delay221400332800021
Delay-1X2


Regards,
Moti
 
Using C$1:C$37 you may fit new data in rows and the formula will still return the correct answer; but if you need to add more that 2 lines of new data then you should work by first inserting the new line and then writing the new data.
If you want to make space only in columns A:P (without changing the content of subsequent columns) then you have to use the command "Insert Cells": select Ax:Px (where x is the line before the headers (before the results) and the Menu /Home /Insert (group Cells), Cells
You can obtain the result with the following macro:
VBA Code:
Sub AddLine()
    Range("A1").End(xlDown).Offset(-2, 0).Range("A1:P1").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End Sub
This assumes column A is empty until the cell containing "Delay"
Wow Anthony47, perfect this is amazing it worked like a piece of cake.

Thank you for taking a time and solving it.(y)

Kind Regards,
Moti :)
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top