简体   繁体   English

根据 if 条件复制和粘贴值

[英]COPY AND Paste values based on if criteria

i am trying to find a way to copy and paste values based on a criteria in excel, and was wondering what the best method would be.我正在尝试找到一种根据 excel 中的条件复制和粘贴值的方法,并且想知道最好的方法是什么。

Sheet 1 Column A has the months 1,2,3 Column B has the sales data for month表 1 A 列有月份 1,2,3 B 列有月份的销售数据

Sheet 2 Reporting Month in A1表 2 A1 中的报告月份

My formula or code needs to copy and paste values the data for each cell in column B on sheet 1, if the month in column A on sheet 1 is less than the value in A1 on sheet 2.如果工作表 1 上 A 列中的月份小于工作表 2 上 A1 中的值,我的公式或代码需要复制并粘贴工作表 1 上 B 列中每个单元格的数据值。

Need your expertise as i'm not very good with excel or vba.需要您的专业知识,因为我不太擅长 excel 或 vba。

cheers in advance提前欢呼

This sounds like a job for Advanced Filter.这听起来像是高级过滤器的工作。 On the data tab, in the Sort & Filter section there is an Advanced link.在数据选项卡上的排序和过滤部分有一个高级链接。 Use the Copy to another location feature to do your copy/paste.使用复制到另一个位置功能进行复制/粘贴。 There is lots of information on the internet about using advanced filter and creating criteria.互联网上有很多关于使用高级过滤器和创建标准的信息。

Helpful Hint: Created a named range for your source data set, it will be easier to run the filter.有用的提示:为您的源数据集创建一个命名范围,运行过滤器会更容易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM