Forum Discussion
YDNIW3791
May 12, 2023Copper Contributor
Formula or Function
I am needing to know if it is possible in Excel to search a column of data and pull a section of that data if it matches certain rules and have it copied into another column. example in my spreadsh...
sanjibdutta
May 13, 2023Brass Contributor
MY quick solution is like this following..
If your data are spread from and below A2,B2,C2(It may be others) then you can try putting formula "==IFERROR(MID(C2,SEARCH("VN#?????? ",C21),9),"No VN#")" in cell B2 and coppy(drag) the formula below till the end of the table it should hopefully copy VN# in column B. If no VN# is present in column C it would display "No VN#" for that cell(You can customize this error message"). You may directly remove VN# from column C because column B depends on the presence of VN# in column C. But If you want column C values in a different column like E you can place formula "=SUBSTITUTE(C2,B2,"")" in column E2..Thanks
If your data are spread from and below A2,B2,C2(It may be others) then you can try putting formula "==IFERROR(MID(C2,SEARCH("VN#?????? ",C21),9),"No VN#")" in cell B2 and coppy(drag) the formula below till the end of the table it should hopefully copy VN# in column B. If no VN# is present in column C it would display "No VN#" for that cell(You can customize this error message"). You may directly remove VN# from column C because column B depends on the presence of VN# in column C. But If you want column C values in a different column like E you can place formula "=SUBSTITUTE(C2,B2,"")" in column E2..Thanks