需要VBA代码 [英] VBA Code Required

查看:74
本文介绍了需要VBA代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我需要以下帮助:

Hi all, I need help with the following:

我有大约260列和20 000行。我需要VBA从J10开始并确定它是否已填充(如果是,则忽略并且不返回KA KB KC KD KE中的任何内容)。如果J10为空,我希望VBA向右移动(从K10开始),
找到前3个填充的单元格(并在KA中返回它们的平均值),另外3个单元格(以KB为单位返回平均值),另一个3个细胞(并在KC中返回平均值),另外3个细胞(并以KD返回平均值),所以基本上它为我提供了4个季度的平均回报。

I have approx 260 columns and 20 000 rows. I need VBA to start from J10 and identify if it is populated (if so then ignore and dont return anything in KA KB KC KD KE). If J10 is empty, I want VBA to go towards the right (starting at K10) and find 1st 3 populated cells (and return their average it in KA), another 3 cells (and return avg in KB), another 3 cells (and return avg in KC), another 3 cells (and return avg in KD), so basically it provides me with the average return for 4 quarters.

然后我需要它再次在J10中启动并确定它是否已填充(如果是,则忽略并且不返回KE中的任何内容)但是如果它是空的(J10),我希望VBA向右走,找到前12个单元格,并在KE中返回标准差。 

Then I need it to start in J10 again and identify if it is populated (if so then ignore and dont return anything in KE) but if it is empty (J10), I want VBA to go towards the right and find first 12 cells and return standard deviation in KE. 

我需要对所有20 000行进行相同的处理。数据点范围从J10到JK10开始,行数从J10开始(向下20000行)。 

I need the same process for all 20 000 rows. The range of data points starts at J10 to JK10 and rows from J10 (down 20000 rows). 

我需要将结果放在KA KB KC KD KE列中。

I need my results to end up in columns KA KB KC KD KE.

推荐答案

这依赖于填充的A列来确定要处理的行数:

This relies on column A being filled to figure out how many rows to handle:


这篇关于需要VBA代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆