# VBA code or any formula

#### Vishaal

##### Active Member
Hi
I have a sheet where we have 15 values in a row
22
44
23
44
55
48
58
32
52
29
33
44
25
56
55
Now i want to know how many times 20 to 30 come in row 1 to 15 in continuing.
And
If i want to put a value, how can, i mean
If 10 to 20 comes in first row then A grade
Again If 10 to 20 comes in second row then B grade
If 10 to 20 not comes in in third row then C grade
If 10 to 20 not comes in fifth row then D grade

Formula will check the continuing of come 20 to 30 or not and It will check and give grade if 20 to 30 comes after 2 day, it will put e grade, if its come after 3 day then f grade

### Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

#### DanteAmor

##### Well-known Member
Now i want to know how many times 20 to 30 come in row 1 to 15 in continuing.

I hope this helps

Excel Workbook
AB
1
2224
344
423
544
655
748
858
932
1052
1129
1233
1344
1425
1556
1655
Hoja11

#### Vishaal

##### Active Member
Thanks bro, point one solved, pls help in other point also

#### DanteAmor

##### Well-known Member
You're welcome.

You can give examples of what you expect at each point

#### Vishaal

##### Active Member

Thanks again bro...

I want this
Pls check the given sheet where we have 14 values in a row,
Row no. 22 40
1. 44 0
3. 23 60
4. 44 0
5. 34 60
6. 29 40
7. 29 40
8. 41 0
9. 52 0
10. 29 80
11. 46 0
12. 44 0
13. 48 0
14. 35 90

If u check then find that if the value between 20 to 40 come regular, a certain value 40 comes (row no. 6 &7)

And if the value between 20 to 40 come after one gap, a certain value 60 comes (row no. 1, 3, 4, 5)

And if the value between 20 to 40 come after double gap, a certain value 80 comes (row no. 8,9,10)

And if the value between 20 to 40 come after three continuing gap a certain value 90 comes (row no. 11,12,13,14)

I hope it will clear the point, pls provide any help.....bro

Pls help bro

#### DanteAmor

##### Well-known Member

Can you explain your example, do not appreciate it well, what do you have and what do you expect from the result?
You could upload some images with explanations.

You could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.

thanks bro.

Youre welcome

Replies
9
Views
81
Replies
1
Views
41
Replies
3
Views
63
Replies
2
Views
39
Replies
5
Views
41