Find and Replace Partial numbers

%3CLINGO-SUB%20id%3D%22lingo-sub-1409888%22%20slang%3D%22en-US%22%3EFind%20and%20Replace%20Partial%20numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1409888%22%20slang%3D%22en-US%22%3E%3CP%3EI%20realize%20this%20is%20a%20simple%20problem%2C%20but%20after%20spending%20a%20ridiculous%20amount%20of%20time%20reading%20and%20researching%2C%20I%20can't%20figure%20it%20out!%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20very%20long%20list%20of%20birthdates%20that%2C%20when%20uploaded%2C%20were%20changed%20from%2019**%20to%2020**.%20I%20want%20to%20correct%20the%20mistake%20by%20using%20find%20and%20replace%2C%20but%20when%20I%20do%20that%20any%20other%20instance%20of%2020%20is%20also%20changed%20to%2019.%20So...%20instead%20of%203%2F20%2F2067%20becoming%203%2F20%2F1967%2C%20it%20becomes%203%2F19%2F1967.%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20can%20I%20target%20and%20change%20the%20year%20prefix%20only%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1409888%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%20on%20Mac%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1410283%22%20slang%3D%22en-US%22%3ERe%3A%20Find%20and%20Replace%20Partial%20numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1410283%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F676136%22%20target%3D%22_blank%22%3E%40arise2read%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESimple%20with%20a%20formula%2C%20but%20not%20so%20simple%20using%20Find%20%26amp%3B%20Replace!%20I%20can%20do%20it%20with%203%20consecutive%20Find%20%26amp%3B%20Replaces%2C%20though%20no%20less%20than%20that%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EFind%20what%3C%2FEM%3E%3A%26nbsp%3B%3CSTRONG%3E20%2F20%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CEM%3EReplace%20with%3C%2FEM%3E%3A%20%3CSTRONG%3E%2320%2F20%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EFind%20what%3C%2FEM%3E%3A%20%3CSTRONG%3E%2F20%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CEM%3EReplace%20with%3C%2FEM%3E%3A%20%3CSTRONG%3E%2F19%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EFind%20what%3C%2FEM%3E%3A%20%3CSTRONG%3E%2320%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CEM%3EReplace%20with%3C%2FEM%3E%3A%20%3CSTRONG%3E20%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20that's%20not%20to%20your%20liking%2C%20perhaps%20a%20formula-based%20approach%20is%20an%20option%20for%20you%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1411423%22%20slang%3D%22en-US%22%3ERe%3A%20Find%20and%20Replace%20Partial%20numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1411423%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F676180%22%20target%3D%22_blank%22%3E%40Jos_Woolley%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20be%20more%20safe%2C%20it's%20better%26nbsp%3B%3CSTRONG%3E20%2F19%3C%2FSTRONG%3E%26nbsp%3Bto%20replace%20on%20%23%3CSTRONG%3E20%2F19%3C%2FSTRONG%3E%26nbsp%3Bas%20well%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1411434%22%20slang%3D%22en-US%22%3ERe%3A%20Find%20and%20Replace%20Partial%20numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1411434%22%20slang%3D%22en-US%22%3ECan%20you%20give%20an%20example%20for%20which%20your%20suggestion%20would%20make%20a%20difference%3F%3CBR%20%2F%3E%3CBR%20%2F%3ERegards%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1411439%22%20slang%3D%22en-US%22%3ERe%3A%20Find%20and%20Replace%20Partial%20numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1411439%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F676180%22%20target%3D%22_blank%22%3E%40Jos_Woolley%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E3%2F20%2F1922%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1411452%22%20slang%3D%22en-US%22%3ERe%3A%20Find%20and%20Replace%20Partial%20numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1411452%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAh%2C%20I%20see.%20I%20discounted%20such%20possibilities%20since%20I%20presumed%20from%20the%20OP's%20original%20post%20that%20all%20dates%20had%20a%20year%20beginning%2020**.%20Though%20I%20may%20be%20wrong%2C%20in%20which%20case%20you%20are%20correct.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1411531%22%20slang%3D%22en-US%22%3ERe%3A%20Find%20and%20Replace%20Partial%20numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1411531%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F676136%22%20target%3D%22_blank%22%3E%40arise2read%3C%2FA%3E%26nbsp%3B%20your%20approach%20seems%20limited%20unless%20you%20are%20sure%20none%20of%20the%20birthdays%20are%20in%20the%202000's.%26nbsp%3B%20I%20would%20instead%20suggest%20making%20a%20new%20column%20with%20a%20formula%20to%20convert%20it.%26nbsp%3B%20For%20example%20maybe%20you%20are%20sure%20none%20are%20%26lt%3B5%20years%20old%20(i.e.%20no%20birthdays%20after%202015)%3A%3C%2FP%3E%3CP%3E%3Dif(year(a1)%26gt%3B2015%2C%20date(2019%2Cmonth(a1)%2Cday(a1))%2Ca1)%3C%2FP%3E%3CP%3Ethat%20will%20get%20you%20an%20Excel%20DATE%20in%20whatever%20format%20your%20excel%20is%20set%20to%20display%20or%20if%20you%20specifically%20want%20the%20output%20as%20text%3C%2FP%3E%3CP%3E%3Dif(year(a1)%26gt%3B2015%2C%20%222019%22%20%26amp%3B%20month(a1)%20%26amp%3B%20day(a1)%2Ca1)%3C%2FP%3E%3CP%3EIf%20you%20don't%20want%20that%20extra%20column%2C%20then%20once%20you%20are%20done%20you%20can%20copy%20the%20column%20of%20correct%20data%20and%20'paste%20special'%20-%26gt%3B%20'values%20only'%20and%20then%20delete%20the%20formula%20and%20incorrect%20data%20columns.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1411965%22%20slang%3D%22en-US%22%3ERe%3A%20Find%20and%20Replace%20Partial%20numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1411965%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F570951%22%20target%3D%22_blank%22%3E%40mtarler%3C%2FA%3E%26nbsp%3B%20This%20is%20excellent%2C%20as%20none%20of%20our%20volunteers%20will%20be%20under%20the%20age%2016%2C%20but%20there%20are%20a%20few%20that%20will%20have%20been%20born%20after%202000.%3C%2FP%3E%3CP%3EHowever%2C%20I%20am%20embarrassingly%20CLUELESS%20when%20it%20comes%20to%20formulas.%20Can%20you%20give%20me%20specific%20directions%20on%20how%20to%20complete%20this%3F%20Should%20I%20copy%20and%20paste%20the%20existing%20birthdate%20column%20to%20a%20new%20column%2C%20and%20put%20the%20formula%26nbsp%3B%3CSPAN%3E%3Dif(year(a1)%26gt%3B2015%2C%20date(2019%2Cmonth(a1)%2Cday(a1))%2Ca1)%20in%20the%20row%20above%20that%3F%20Do%20I%20copy%20this%20formula%20exactly%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1412092%22%20slang%3D%22en-US%22%3ERe%3A%20Find%20and%20Replace%20Partial%20numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1412092%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F676136%22%20target%3D%22_blank%22%3E%40arise2read%3C%2FA%3E%26nbsp%3B%20the%20formula%20was%20'generic'%20assuming%20the%20dates%20of%20interest%20are%20in%20column%20A%20and%20starting%20in%20row%201%20and%20that%20you%20would%20past%20the%20formula%20and%20fill%20down%20accordingly.%3C%2FP%3E%3CP%3EQuick%20lesson%20in%20formulas%3A%3C%2FP%3E%3CP%3E%3CSPAN%3E%3Dif(year(%3CFONT%20color%3D%22%23ff6600%22%3Ea1%3C%2FFONT%3E)%26gt%3B2015%2C%20date(2019%2Cmonth(%3CFONT%20color%3D%22%23ff6600%22%3Ea1%3C%2FFONT%3E)%2Cday(%3CFONT%20color%3D%22%23ff6600%22%3Ea1%3C%2FFONT%3E))%2C%3CFONT%20color%3D%22%23ff6600%22%3Ea1%3C%2FFONT%3E)%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Ethe%20%22a1%22%20listed%20refers%20to%20cell%20(A1).%20%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Eso%20if%20you%20have%20all%20the%20birthdays%20in%20column%20A%20starting%20in%20A1%20you%20could%20paste%20this%20in%20B1%20and%20then%20as%20you%20copy%20or%20fill%20down%2C%20excel%20with%20change%20the%20%22A1%22%20in%20the%20formula%20to%20A2%2C%20A3%2C%20A4%2C%20...%20so%20that%20the%20cell%20it%20is%20pointing%20at%20is%20always%20in%20the%20same%20relative%20location%20(i.e.%20the%20cell%20to%20its%20left)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EIf%20you%20don't%20want%20excel%20to%20automatically%20change%20that%20pointer%20then%20add%20a%20%22%24%22%20in%20front%20of%20what%20you%20don't%20want%20to%20change.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Efor%20example%20if%20instead%20of%20%222015%22%20you%20want%20to%20use%20what%20ever%20year%20you%20type%20into%20cell%20F1%20then%20use%20%24F%241%20so%20as%20you%20fill%20down%20excel%20won't%20change%20it%20and%20all%20the%20cell%20formulas%20down%20the%20column%20will%20still%20point%20to%20%24F%241%26nbsp%3B%20(note%3A%20because%20you%20are%20only%20filling%20down%20in%201%20column%20the%20relative%20column%20isn't%20changing%20so%20you%20could%20use%20F%241%20since%20the%20F%20wouldn't%20change%20any%20how)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Ethat%20said%2C%26nbsp%3Bif%20your%20birthdays%20start%20in%20D2%20(i.e.%20D1%20is%20a%20title)%20then%20change%20all%20the%20%22a1%22s%20to%20%22D2%22s%20and%20paste%20it%20into%20cell%20E2%20and%20fill%20down.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThese%20are%20some%20very%20important%20basics%20you%20should%20play%20with%20and%20learn%20and%20maybe%20watch%20a%20youtube%20on%20if%20needed%20because%20they%20will%20help%20you%20a%20lot.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I realize this is a simple problem, but after spending a ridiculous amount of time reading and researching, I can't figure it out! 

I have a very long list of birthdates that, when uploaded, were changed from 19** to 20**. I want to correct the mistake by using find and replace, but when I do that any other instance of 20 is also changed to 19. So... instead of 3/20/2067 becoming 3/20/1967, it becomes 3/19/1967. 

How can I target and change the year prefix only?

 

Thanks!

8 Replies
Highlighted

@arise2read 

 

Hi,

 

Simple with a formula, but not so simple using Find & Replace! I can do it with 3 consecutive Find & Replaces, though no less than that:

 

Find what20/20

Replace with: #20/20

 

Find what: /20

Replace with: /19

 

Find what: #20

Replace with: 20

 

If that's not to your liking, perhaps a formula-based approach is an option for you?

 

Cheers

Highlighted

@Jos_Woolley 

To be more safe, it's better 20/19 to replace on #20/19 as well

Highlighted
Can you give an example for which your suggestion would make a difference?

Regards
Highlighted

@Jos_Woolley 

3/20/1922

Highlighted

@Sergei Baklan 

 

Ah, I see. I discounted such possibilities since I presumed from the OP's original post that all dates had a year beginning 20**. Though I may be wrong, in which case you are correct.

 

Regards

Highlighted

@arise2read  your approach seems limited unless you are sure none of the birthdays are in the 2000's.  I would instead suggest making a new column with a formula to convert it.  For example maybe you are sure none are <5 years old (i.e. no birthdays after 2015):

=if(year(a1)>2015, date(2019,month(a1),day(a1)),a1)

that will get you an Excel DATE in whatever format your excel is set to display or if you specifically want the output as text

=if(year(a1)>2015, "2019" & month(a1) & day(a1),a1)

If you don't want that extra column, then once you are done you can copy the column of correct data and 'paste special' -> 'values only' and then delete the formula and incorrect data columns.

Highlighted

@mtarler  This is excellent, as none of our volunteers will be under the age 16, but there are a few that will have been born after 2000.

However, I am embarrassingly CLUELESS when it comes to formulas. Can you give me specific directions on how to complete this? Should I copy and paste the existing birthdate column to a new column, and put the formula =if(year(a1)>2015, date(2019,month(a1),day(a1)),a1) in the row above that? Do I copy this formula exactly?

 

Thank you for your help!

Highlighted

@arise2read  the formula was 'generic' assuming the dates of interest are in column A and starting in row 1 and that you would past the formula and fill down accordingly.

Quick lesson in formulas:

=if(year(a1)>2015, date(2019,month(a1),day(a1)),a1)

the "a1" listed refers to cell (A1).  

so if you have all the birthdays in column A starting in A1 you could paste this in B1 and then as you copy or fill down, excel with change the "A1" in the formula to A2, A3, A4, ... so that the cell it is pointing at is always in the same relative location (i.e. the cell to its left)

If you don't want excel to automatically change that pointer then add a "$" in front of what you don't want to change.

for example if instead of "2015" you want to use what ever year you type into cell F1 then use $F$1 so as you fill down excel won't change it and all the cell formulas down the column will still point to $F$1  (note: because you are only filling down in 1 column the relative column isn't changing so you could use F$1 since the F wouldn't change any how)

that said, if your birthdays start in D2 (i.e. D1 is a title) then change all the "a1"s to "D2"s and paste it into cell E2 and fill down.

These are some very important basics you should play with and learn and maybe watch a youtube on if needed because they will help you a lot.