VB Code / Formula - in sheet

Vishaal

Well-known Member
Joined
Mar 16, 2019
Messages
533
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
  2. Web
Hi All,

Thanks in advance.

i have the below sheet

S.No.Number Description
15
23
38Na
41
57Na
69Na
76Na
84
91
107Na
116Na
122
137Na
148Na
154
163Na

<tbody>
</tbody>

Now i want the result in fourth column (It will check the numbers of "Na" from description column and show the number in "Result" column), please check the below table

S.No.Number DescriptionResult
15
23
38Na1
41
57Na
69Na
76Na3
84
91
107Na
116Na2
122
137Na
148Na2
154
163Na1

<tbody>
</tbody>

in "Result" column i am also checking that the how many times showing result is repeated,
i mean
One= 2 times
Two= 2 times
Three = One time
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Something like this?
Each formula copied down.

Excel Workbook
ABCDEF
1S.No.NumberDescriptionResultResultsRepeats
215 12
32322
438Na131
54140
657Na
769Na
876Na3
984
1091
11107Na
12116Na2
13122
14137Na
15148Na2
16154
17163Na1
18
Count Na
 
Upvote 0
Thanks Peter_SSs ji

Many thanks for the quick reply.

Coloumn "F" is great, its working in my case.
Can, may i get the formula/vb code for getting the same result as shown in "D"

Same as in coloumn "D" not as in coloumn "E"
 
Upvote 0
Confused... Peter has already posted the formula for column D :confused:
 
Upvote 0
Thanks Peter_SSs ji

I am really Sorry for my previous reply.

You are great, i don't know how you solveed this type of complex problems easily

Thanks
 
Last edited:
Upvote 0
Thanks Peter_SSs ji

I am really Sorry for my previous reply.

You are great, i don't know how you solveed this type of complex problems easily

Thanks
No problem. You are welcome. Thanks for the clarification. :)
 
Upvote 0
Hi Peter_SSs Ji,

This formula for coloumn "C"
D2 =IF(AND(C2="Na",C3=""),COUNTIF(C$2:C2,"Na")-SUM(D$1:D1),"")

Can we use it for row no. 3, if we copy and transpose all the data

If yes, may i know the change in formula
 
Upvote 0
it is possible, pls confirm
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

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