In my worksheet on column B if i make a second entry of the same name of stock it should give a popup :recurrence in cell B3
pls see the attached file
In my worksheet on column B if i make a second entry of the same name of stock it should give a popup :recurrence in cell B3
pls see the attached file
Recurrence cell "B5, cell B10"
Unless you have TEXTJOIN, this is only possible via VBA.
I did see a formula that could do this last week but it was extremely complicated and most likelt data dependent.
You can use Conditional Formatting with a COUNTIF to highlight a duplicate when it's entered.
Regards
Special-K
Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.
You could also use a COUNTIF formula with data validation to prevent duplicate entries, with an error message saying it's a duplicate value. It just wouldn't specify the duplicate cell:
Adjust your range as necessary. See attached file incorporating both solutions.Please Login or Register to view this content.
Last edited by Melvosh; 03-22-2019 at 12:47 PM. Reason: attached file
This should do it in the worksheet module. Note remove comments from column B.
Please Login or Register to view this content.
One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.
A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.
Here is a non-vba version using the same logic. But you need the data in a table so the formula copies down and the range automatically extends with the table.
Into sheet module.
Please Login or Register to view this content.
Happy with my answer * Add Reputation.
If You are happy with solution, please use Thread tools and mark thread as SOLVED.
KOKOSEK,thanks for the code.
after adding the code to sheet module...........
RELIANCE is already in B7................
i entered reliance in B9. it gives a POPUP saying "recurrance B9...............
The pop up should say recurrance B7 and NOT B9 . the code should look for the previous entry and not for the present. if there are two occurances it should show all the cell addresses.
dflak, thanks for the code. i incorporated the code in the sheet module. when i enter reliance in cell B9 it does give a popup. But if there are already two entries and i am making the third it will give the same popup. code only takes the first entry reference.
i wish that the popup gives cell references.for example,,,,,,,,,,,, if "reliance" has two apperances before, then on the third entry the popup should say recurrences in cell b3 ,b9
Last edited by sumesh56; 04-06-2019 at 12:28 PM.
Two small tweaks:
Please Login or Register to view this content.
KOKOSEK, works fine.
if there is one comma after each cell address it would have been more convenient. can we incorporate that option also in the code?also make it case free. Uppercase/Lowercase(reliance/RELIANCE)
if reliance is there on B2
it is there in B12
then when i enter it on B20, the pop up should show ----recurrence in B2,B12
if i enter reliance in B28, the pop up should say........recurrence in B2,B12,B20
Last edited by sumesh56; 04-11-2019 at 12:30 PM.
What you mean as case free?Please Login or Register to view this content.
reliance <> RELIANCE ---> remove UCase from code
reliance = RELIANCE ---> leave UCase in code
kOKOSEK, thanks for the code . it works fine. have a nice day
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks