help formular excel!!!

Nguyen Anh Dung

Board Regular
Joined
Feb 28, 2020
Messages
180
Office Version
  1. 2016
Platform
  1. Windows
i have picture as below
i have vlookup get data from sheet 1 to sheet 2
in this case column B if duplicate then column C +1. i want result as Column D.

1663487099866.png

Best regards,
Nguyen Anh Dung
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
in your example column C ALL ends in a 1 - is that the case - everything ends in 1
how about
=IF(C1<>C2,C2,IF(C1=C2,D1+1,C2))

whats column A showing or how derived ??

Book2
ABCD
11245
26411164111
36411164112
46411164113
56411164114
66411164115
76411164116
88543185431
98543185432
108543185433
118543185434
128543185435
138543185436
148543185437
158543185438
169123191231
17888881888881
Sheet2
Cell Formulas
RangeFormula
D2:D17D2=IF(C1<>C2,C2,IF(C1=C2,D1+1,C2))


Note: Images are difficult to see , and also requires that I input all the data myself, which is very time consuming.

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed
 
Upvote 0
Upvote 0
@Nguyen Anh Dung
Try like
Book1.xlsx
CD
145
2641551641551
3641551641552
4641551641553
5641551641554
6641551641555
7641551641556
8641801641801
9641801641802
10641801641803
11641801641804
12641801641805
13641801641806
14641801641807
15641801641808
16641801641809
17641801641810
18641801641811
19641801641812
20641801641813
21641801641814
22641801641815
23641801641816
24641801641817
25641801641818
26641801641819
27641801641820
28641801641821
Sheet1
Cell Formulas
RangeFormula
D2:D28D2=C2+COUNTIF(C$2:C2,C2)-1
Thanks you so much!!!
 
Upvote 0
@Nguyen Anh Dung
Try like
Book1.xlsx
CD
145
2641551641551
3641551641552
4641551641553
5641551641554
6641551641555
7641551641556
8641801641801
9641801641802
10641801641803
11641801641804
12641801641805
13641801641806
14641801641807
15641801641808
16641801641809
17641801641810
18641801641811
19641801641812
20641801641813
21641801641814
22641801641815
23641801641816
24641801641817
25641801641818
26641801641819
27641801641820
28641801641821
Sheet1
Cell Formulas
RangeFormula
D2:D28D2=C2+COUNTIF(C$2:C2,C2)-1
with condition is column B duplicate, can combine vlookup at column C?
1663492588861.png

Best ragards,
Dung
 
Upvote 0
Not tested and hopefully not too mis-typed but, try like
Excel Formula:
=VLOOKUP($B4,'ban giao '!$A$5:$C$124,2,0)+COUNTIF(B$4:B4,B4)-1
 
Upvote 0
Not tested and hopefully not too mis-typed but, try like
Excel Formula:
=VLOOKUP($B4,'ban giao '!$A$5:$C$124,2,0)+COUNTIF(B$4:B4,B4)-1
75 / 5.000


Thanks sir very much!!!
Let me ask another case: i want to create 5 rows with 1 number and repeat 5 rows with other numbers as belows picture
1663494851041.png

help formular in this case

Thanks sir!!!
Dung
 
Upvote 0

Forum statistics

Threads
1,215,327
Messages
6,124,287
Members
449,149
Latest member
mwdbActuary

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