Delete Specific Data using Excel VBA
A website visitor has an interesting question:
My sheet1 has the following records in Excel 2007:
Code Item dim qty price
1001 Ball 7" 1 100
1002 Belt 36" 1 150
1003 Chain 12" 1 50
Now in sheet2 in any of the cell, say from A1 to A10 if I mention
just 1001 and enter then in sheet1 the entire row from Item to Price
should become blank. But the number in cell should not be deleted (i.e. 1001)
Now in sheet2 again in cell A7 I give 1003 then in sheet1 the entire row
from Item to Price should become blank. But the number in cell should not be deleted (i.e. 1007)
Looking out for the solution for this. Tried a lot but unable to do it.
If you write a macro in a specific sheet, say sheet1, then you may have a problem running the code because in this case you also need to access sheet2. Therefore you need a stand alone module.
First we find out which code the user enters in a worksheet2 and capture it in a variable. Next we go to sheet one and loop through its data and compare the code numbers with the code number captured in the variable 'num'. If we find the code we then select the appropriate row and columns and delete the specific data like for example in columns 2 to 5. Here we combine the interesting property of the 'Range' and the 'cells property' to access the correct column and row range. Once the data is accessed we can then clear the contents only of those cells in a specific manner.
Once you study the video you'll realize that it has covered many interesting aspects of Excel VBA.
Also you can assign a 'shortcut' to the macro such as 'Ctrl+m'.
You can see more details here:
https://www.exceltrainingvideos.com/delete-specific-data-from-an-excel-worksheet-using-vba/
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Delete Specific Data using Excel VBA», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.