当值= J时,在同一行,不同列中发送电子邮件

时间:2016-02-11 18:13:04

标签: vba excel-vba excel

我有以下代码,只要在第22列V中找到了一个电子邮件地址,就会调用SendSingleMail函数。

UITableViewCell *cell = //deque the cell

NSString *responseKey = [NSString stringWithFormat:"%d,%d", indexPath.section,indexPath.row];

NSString *htmlData = responseData[responseKey];

if(htmlData == nil)
{
    htmlData = //whatever the way do your request, put the response in the htmlData. as you are doing asynchronous loading of the web-request, set the cell's webView in the completion. NB:: do gui related work on gui/main thread.

    responseData[responseKey] = htmlData;
}

//set the htmlData to your, cell's webView

我正在尝试添加第二个循环,指向第6列,F:在此列中,我有“J”或“N”(是/否)来确定是否必须发送电子邮件每一行。

1 个答案:

答案 0 :(得分:0)

您需要按如下方式修改代码。将“put_row_number_here”替换为您要启动的行号,并将“put_column_number_here”替换为您要启动的列。

Cells(put_row_number_here, put_column_number_here).Select

Do Until ActiveCell = ""
    If ActiveCell.Offset(0,4).Value = "J" Then
        strEmailTo = ActiveCell.Value
        SendSingleMail (strEmailTo)
    End If

    ActiveCell.Offset(1,0).Select
Loop