怎么打出同表示一样的词语语

我想做如下要求的筛选:以B列数据作为筛选对象,当B列中有相同代码时则显示出来,只有1个数据的不显示,而且符合条件的整行都要显示出来,C-Z列都有数据,只不过被我删了。
例如:101036在整列中没有相同的,这种数据我不需要,代码B4-B10数据都相同,我希望全部显示,且整行数据都显示,同样101039…………都是我需要的数据
14:55 上传
在线时间76 小时经验193 威望0 性别保密最后登录注册时间阅读权限20UID2063707积分193帖子精华0分享0
EH初级, 积分 193, 距离下一级还需 157 积分
积分排行3000+帖子精华0微积分0
谁来帮忙下哈
在线时间244 小时经验61 威望0 性别男最后登录注册时间阅读权限20UID2234626积分61帖子精华0分享0
EH初级, 积分 61, 距离下一级还需 289 积分
积分排行3000+帖子精华0微积分0
直接用函数这个好像有点难。呵呵,帮你顶
在线时间76 小时经验193 威望0 性别保密最后登录注册时间阅读权限20UID2063707积分193帖子精华0分享0
EH初级, 积分 193, 距离下一级还需 157 积分
积分排行3000+帖子精华0微积分0
其他方法也行啊,只要能整出来就行
在线时间4259 小时经验12541 威望8 性别保密最后登录注册时间阅读权限95UID995816积分12541帖子精华0分享0
积分排行52帖子精华0微积分0
火箭蛋 发表于
谁来帮忙下哈
又见楼主,
加个辅助列,countif(b:b,b1)下拉,b列计次,然后筛选不为1的。
如果需要在别的表返回,看着数据量,公式就别考虑了,
sql试一试。
本帖评分记录鲜花
总评分:&鲜花 + 2&
数组公式==编辑栏内粘贴公式---ctrl+shift+回车键输入。输入后公式前后会自动出现大括号
sql语句==数据-导入外部数据-导入数据-选择路径和表-编辑-输入SQL语句-选择创建表或透视表-选择存放位置-完成
在线时间244 小时经验61 威望0 性别男最后登录注册时间阅读权限20UID2234626积分61帖子精华0分享0
EH初级, 积分 61, 距离下一级还需 289 积分
积分排行3000+帖子精华0微积分0
加一列的方法我倒是想出来一个
在C列统计出B列所有有重复的数据IF(COUNTIF(b:b,B2)&1,&重复&,&&)&&下拉,然后对C列进行自动筛选
本帖评分记录鲜花
总评分:&鲜花 + 2&
在线时间244 小时经验61 威望0 性别男最后登录注册时间阅读权限20UID2234626积分61帖子精华0分享0
EH初级, 积分 61, 距离下一级还需 289 积分
积分排行3000+帖子精华0微积分0
回复晚了,俺有剽窃5楼大侠之嫌,罪过罪过
在线时间76 小时经验193 威望0 性别保密最后登录注册时间阅读权限20UID2063707积分193帖子精华0分享0
EH初级, 积分 193, 距离下一级还需 157 积分
积分排行3000+帖子精华0微积分0
这主意的确不错
在线时间76 小时经验193 威望0 性别保密最后登录注册时间阅读权限20UID2063707积分193帖子精华0分享0
EH初级, 积分 193, 距离下一级还需 157 积分
积分排行3000+帖子精华0微积分0
魂断蓝桥 发表于
又见楼主,
加个辅助列,countif(b:b,b1)下拉,b列计次,然后筛选不为1的。
呵呵,谢谢老师指导,上次的SQL语句蛮好用的
积分≥4700即可申请
金牌优秀会员
金牌优秀会员奖章No.2
金牌优秀会员
金牌优秀会员奖章No.1
优秀会员奖章No.4
优秀会员奖章No.3
优秀会员奖章No.2
优秀会员奖章No.1
- 注意:自起,未完成邮箱认证的会员将无法发帖!如何完成邮箱认证?请点击下方“查看”。
关注我们,与您相约微信公众平台!
Copyright 1999 - 2017 Excel Home. All Rights Reserved.本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!
Powered by
本站特聘法律顾问:徐怀玉律师 李志群律师 &&智能ABC打出的字全部是一样的词语是怎么回事_百度知道
智能ABC打出的字全部是一样的词语是怎么回事
好象我打个:HX,后面的词全部是好象这2个字啊
提问者采纳
这没事的,只是你打这个词的次数比较多,而智能ABC里又没这个次,所以它就记忆下了,时间稍过点,就没这种情况了。
其他类似问题
智能abc的相关知识
其他1条回答
士大夫改变撒旦黄金时代防空壕大师傅贺兰山感到划时代看法护身符挥洒代表反函数不但开会吧开场白但是可变成可是开会似的环境吧复活节时光复活节撒发挥感时光深刻大会风格三点会看法包括厂何必三点会法看法辉钴矿沙锅法核蛋白感洋撒赶快褐家鼠打边鼓河北省挥洒开会潮白河喀什bhhsgdbhksha
等待您来回答
您可能关注的推广
下载知道APP
随时随地咨询
出门在外也不愁public class DataGridViewPrint
public DataGridViewPrint()
private DataGridView[] dataGridViewP;
private PrintDocument printD
private PageSetupDialog pageSetupD
private PrintPreviewDialog printPreviewD
private int dgvIndex = 0;
private int rowCount = 0;
private int colCount = 0;
private int x = 0;
private int y = 0;
private int i = 0;
private int j = 0;
private int rowGap = 20;
private int colGap = 5;
private int leftMargin = 50;
private Font font = new Font("Arial", 10);
private Font headingFont = new Font("Arial", 11, FontStyle.Underline);
private Font captionFont = new Font("Arial", 10, FontStyle.Bold);
private Brush brush = new SolidBrush(Color.Black);
private string cellValue = "";
public DataGridViewPrint(DataGridView[] dataGridView1)
this.dataGridViewP = dataGridView1;
printDocument = new PrintDocument();
printDocument.PrintPage += new PrintPageEventHandler(this.printDocument_PrintPage);
private void printDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
for (; dgvIndex & dataGridViewP.L dgvIndex++)
rowCount = dataGridViewP[dgvIndex].Rows.C
colCount = dataGridViewP[dgvIndex].ColumnC
//print headings
for (j = 0; j & colC j++)
if (j != colCount)
if (dataGridViewP[dgvIndex].Columns[j].Width & 0)
cellValue = dataGridViewP[dgvIndex].Columns[j].HeaderT
//Pen pe = new Pen(dataGridViewP[dgvIndex].GridColor,1);
//e.Graphics.DrawRectangle(pe, x坐标, y坐标, x, y); //绘制出格子
e.Graphics.DrawString(cellValue, headingFont, brush, x, y);
x += dataGridViewP[dgvIndex].Columns[j].Width + colG
//print all rows
for (int i = 0; i & rowC i++)
for (int k = 0; k & colC k++)
if (k != colCount)
if (dataGridViewP[dgvIndex].Columns[k].Width & 0)
cellValue = dataGridViewP[dgvIndex].Rows[i].Cells[k].EditedFormattedValue.ToString();//得到当前格式化的值
//Pen pe = new Pen(dataGridViewP[dgvIndex].GridColor, 1); //这里不知道怎么画了,控制不好x,y坐标
//e.Graphics.DrawRectangle(pe, x坐标, y坐标, x, y);
//绘制出格子
e.Graphics.DrawString(cellValue, font, brush, x, y);
x += dataGridViewP[dgvIndex].Columns[k].Width + colG
y = y + rowGap * (cellValue.Split(new char[] { ' ', ' ' }).Length - 1);
if (y &= e.PageBounds.Height - 50)
//允許多頁打印
e.HasMorePages = true;
* PrintPageEventArgs類的HaeMorePages屬性為True時,通知控件器,必須再次調用OnPrintPage()方法,打印一個頁面。
* PrintLoopI()有一個用於每個要打印的頁面的序例。如果HasMorePages是False,PrintLoop()就會停止。
e.HasMorePages = false;
public PrintDocument GetPrintDocument()
return printD
public void Print()
printDocument.Print();
catch (Exception e)
throw new Exception("Printer error." + e.Message);
public void Print1()
pageSetupDialog = new PageSetupDialog();
pageSetupDialog.Document = printD
pageSetupDialog.ShowDialog();
printPreviewDialog = new PrintPreviewDialog();
printPreviewDialog.Document = printD
printPreviewDialog.Height = 800;
printPreviewDialog.Width = 800;
printPreviewDialog.ShowDialog();
catch (Exception e)
throw new Exception("Printer error." + e.Message);
/*画图类*/using Susing System.Collections.GponentMusing System.Dusing System.Dusing System.Tusing System.Windows.Fusing senzhen.xunlian.using System.Data.SqlCusing System.Cusing System.Cnamespace senzhen.xingzk{
public partial class anpssqk : Form
//created sql connection
public string Scc
set { scc = }
string ConnectionString = ConfigurationManager.ConnectionStrings["sportConnectionString"].ToString();
private SqlConnection conn = new SqlConnection
(System.Configuration.ConfigurationManager.ConnectionStrings["sportConnectionString"].ToString());
private SqlDataA
private DataS
private ComboBox suslsqk_Ddl = new ComboBox();
public anpssqk()
InitializeComponent();
instance =
shanchu_Btn.Visible =
suslsqk_Ddl.TextChanged += new EventHandler(suslsqk_Ddl_TextChanged);
dataGridView1.CellClick += new DataGridViewCellEventHandler(dataGridView1_CellClick);
this.FormClosed += new FormClosedEventHandler(anpssqk_FormClosed);
void anpssqk_FormClosed(object sender, FormClosedEventArgs e)
instance =
public static anpssqk getInstance()
if (instance == null)
instance = new anpssqk();
private static anpssqk instance =
void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
if (!dataGridView1.ReadOnly)
Type t = ds.Tables[0].Columns[8].DataT
Rectangle Rect = this.dataGridView1.GetCellDisplayRectangle
(8, e.RowIndex, false);
suslsqk_Ddl.Visible =
suslsqk_Ddl.Top = Rect.T
suslsqk_Ddl.Left = Rect.L
suslsqk_Ddl.Height = Rect.H
suslsqk_Ddl.Width = Rect.W
suslsqk_Ddl.Text = dataGridView1.CurrentRow.Cells[8].Value.ToString();
void suslsqk_Ddl_TextChanged(object sender, EventArgs e)
dataGridView1.CurrentRow.Cells[8].Value = suslsqk_Ddl.T
private void anpssqk_Load(object sender, EventArgs e)
//权限由张伟加入
baocun_Btn.Visible =
xiugai_Btn.Visible =
shanchu_Btn.Visible =
if (new xitong.quanXianPanDuan().juesheGongnengQuanxian(new xitong.quanXianPanDuan().juesheID(), 58) == 1)
baocun_Btn.Visible =
xiugai_Btn.Visible =
//shanchu_Btn.Visible =
LoadData();
//LoadCombolData();
private void baocun_Btn_Click(object sender, EventArgs e)
//if (dataGridView1.CurrentRow.Cells[3].Value == DBNull.Value)
MessageBox.Show("请选中相应行进行修改");
int ID =Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value);
string fanghao = dataGridView1.CurrentRow.Cells[9].Value.ToString();
string puhao = dataGridView1.CurrentRow.Cells[10].Value.ToString();
//string sqlstr = "update anpssqk set susapqq='"+strSusapqq+"', suslsqk='" + suslsqk_Ddl.SelectedValue + "' where ID = '" + ID + "'";
string sqlstr = "update anpssqk set suslsqk='" + suslsqk_Ddl.SelectedValue + "', fanghao='" + fanghao + "', pohao='" + puhao
+ "' where ID = '" + ID + "'";
//string sqlstr = "update anpssqk set suslsqk='" + suslsqk_Ddl.SelectedValue + "' where ID = '" + ID + "'";
SqlCommand sql = new SqlCommand(sqlstr, conn);
conn.Open();
sql.ExecuteNonQuery();
MessageBox.Show(""+dataGridView1.CurrentRow.Cells[1].Value.ToString()+"记录更改成功!");
conn.Close();
catch (SqlException ex)
MessageBox.Show("更改出现问题!" + ex);
LoadData();
private void xiugai_Btn_Click(object sender, EventArgs e)
MessageBox.Show("你可以修改了");
suslsqk_Ddl.Visible =
dataGridView1.ReadOnly =
dataGridView1.Columns[0].ReadOnly =
dataGridView1.Columns[1].ReadOnly =
dataGridView1.Columns[2].ReadOnly =
dataGridView1.Columns[3].ReadOnly =
dataGridView1.Columns[4].ReadOnly =
dataGridView1.Columns[5].ReadOnly =
dataGridView1.Columns[6].ReadOnly =
dataGridView1.Columns[7].ReadOnly =
LoadCombolData();
private void retuichu_Btn_Click(object sender, EventArgs e)
suslsqk_Ddl.Dispose();
this.Close();
this.Dispose();
private void LoadData()
int needEvent = 0;//created
string sqlString = "SELECT anpssqk.ID AS 编号, YD_Iss_xiangxixinxi.xingm AS 姓名, dm_xingbie.xingbie AS 性别, anpssqk.riqi AS 请求日期,"
+"yundzx.yundzx AS 运动专项, yundd.yundd AS 运动队, waipjlygrjbxxb.xingming AS 教练, anpssqk.susapqq AS 宿舍安排请求,"
+"anpssqk.suslsqk AS 宿舍安排情况, anpssqk.fanghao AS 房号, anpssqk.pohao AS 床铺号 "
dm_xingbie RIGHT OUTER JOIN "
YD_Iss_xiangxixinxi INNER JOIN "
anpssqk ON YD_Iss_xiangxixinxi.ID = anpssqk.ydyID LEFT OUTER JOIN "
yundzx ON yundzx.id = YD_Iss_xiangxixinxi.yundzx LEFT OUTER JOIN "
yundd ON yundd.id = YD_Iss_xiangxixinxi.yundd LEFT OUTER JOIN "
waipjlygrjbxxb ON waipjlygrjbxxb.ID = YD_Iss_xiangxixinxi.suosjl ON dm_xingbie.xingbieID = YD_Iss_xiangxixinxi.xingbie "
+ " order by anpssqk.riqi DESC";
//string sqlString = "select anpssqk.ID as
//+ " YD_Iss_xiangxixinxi.xingm as 姓名,riqi as 日期,"
//+ "susapqq AS 宿舍安排请求,suslsqk AS 宿舍安排情况 from anpssqk
INNER JOIN YD_Iss_xiangxixinxi "
//+ " ON anpssqk.ydyID = YD_Iss_xiangxixinxi.ID
order by 日期 DESC";
sda = new SqlDataAdapter(sqlString, conn);
ds = new DataSet();
sda.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];
catch (SqlException ex)
MessageBox.Show("连接数据库出现错误"+ex);
dataGridView1.Controls.Add(suslsqk_Ddl);
suslsqk_Ddl.Visible =
dataGridView1.ReadOnly =
for (int i = 0; i & dataGridView1.Rows.C i++)
this.dataGridView1.Columns[i].Resizable = System.Windows.Forms.DataGridViewTriState.F
this.dataGridView1.Columns[i].SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotS
//this.dataGridView1.Columns[0].Resizable = System.Windows.Forms.DataGridViewTriState.F
//this.dataGridView1.Columns[1].Resizable = System.Windows.Forms.DataGridViewTriState.F
//this.dataGridView1.Columns[2].Resizable = System.Windows.Forms.DataGridViewTriState.F
//this.dataGridView1.Columns[3].Resizable = System.Windows.Forms.DataGridViewTriState.F
//this.dataGridView1.Columns[4].Resizable = System.Windows.Forms.DataGridViewTriState.F
//this.dataGridView1.Columns[0].SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotS
//this.dataGridView1.Columns[1].SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotS
//this.dataGridView1.Columns[2].SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotS
//this.dataGridView1.Columns[3].SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotS
//this.dataGridView1.Columns[4].SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotS
for (int i = 0; i & dataGridView1.Rows.C i++)
if (dataGridView1.Rows[i].Cells[8].Value.ToString().Trim().Contains("已落实") ||
dataGridView1.Rows[i].Cells[8].Value.ToString().Trim().Contains("未落实"))
dataGridView1.Rows[i].Cells[8].Style.BackColor = Color.DarkG
if (dataGridView1.Rows[i].Cells[8].Value.ToString().Trim().Contains("未处理"))
for (int j = 0; j & dataGridView1.Columns.C j++)
dataGridView1.Rows[i].Cells[j].Style.BackColor = Color.S
needEvent++;
dataGridView1.Rows[i].Cells[4].Style.BackColor = Color.W
toolStripStatusLabel1.Text = "你一共有未处理的安排宿舍请求 " + needEvent + " 条";
toolStripStatusLabel1.ForeColor = System.Drawing.Color.R
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowS
dataGridView1.AllowUserToAddRows =
sorry,弄错了,重发using Susing System.Collections.Gusing System.Windows.Fusing System.Dusing System.Cusing System.Dusing System.Tnamespace senzhen.xingzk{
class PrintDGV
private static StringFormat StrF
// Holds content of a TextBox Cell to write by DrawString
private static StringFormat StrFormatComboB // Holds content of a Boolean Cell to write by DrawImage
private static Button CellB
// Holds the Contents of Button Cell
private static CheckBox CellCheckB
// Holds the Contents of CheckBox Cell
private static ComboBox CellComboB
// Holds the Contents of ComboBox Cell
private static int TotalW
// Summation of Columns widths
private static int RowP
// Position of currently printing row
private static bool NewP
// Indicates if a new page reached
private static int PageNo;
// Number of pages to print
private static ArrayList ColumnLefts = new ArrayList();
// Left Coordinate of Columns
private static ArrayList ColumnWidths = new ArrayList(); // Width of Columns
private static ArrayList ColumnTypes = new ArrayList();
// DataType of Columns
private static int CellH
// Height of DataGrid Cell
private static int RowsPerP
// Number of Rows per Page
private static System.Drawing.Printing.PrintDocument printDoc =
new System.Drawing.Printing.PrintDocument();
// PrintDocumnet Object used for printing
private static string PrintTitle = "深圳市体工大队";
// Header of pages
private static DataGridV
// Holds DataGridView Object to print its contents
private static List&string& SelectedColumns = new List&string&();
// The Columns Selected by user to print.
private static List&string& AvailableColumns = new List&string&();
// All Columns avaiable in DataGrid
private static bool PrintAllRows =
// True = print all rows,
False = print selected rows
private static bool FitToPageWidth = // True = Fits selected columns to page width ,
False = Print columns as showed
private static int HeaderHeight = 0;
private static string T
public static void Print_DataGridView(DataGridView dgv1,string title)
/////////////////////////
PrintPreviewD
// Getting DataGridView object to print
dgv = dgv1;
// Getting all Coulmns Names in the DataGridView
AvailableColumns.Clear();
foreach (DataGridViewColumn c in dgv.Columns)
if (!c.Visible)
AvailableColumns.Add(c.HeaderText);
//SelectedColumns = c.IsDataBound.ToString();
SelectedColumns = AvailableC
// Showing the PrintOption Form
//PrintOptions dlg = new PrintOptions(AvailableColumns);
//if (dlg.ShowDialog() != DialogResult.OK)
//PrintTitle = dlg.PrintT
//PrintAllRows = dlg.PrintAllR
//FitToPageWidth = dlg.FitToPageW
//SelectedColumns = dlg.GetSelectedColumns();
RowsPerPage = 0;
ppvw = new PrintPreviewDialog();
ppvw.Document = printD
// Showing the Print Preview Page
printDoc.BeginPrint += new System.Drawing.Printing.PrintEventHandler(PrintDoc_BeginPrint);
printDoc.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(PrintDoc_PrintPage);
if (ppvw.ShowDialog() != DialogResult.OK)
printDoc.BeginPrint -= new System.Drawing.Printing.PrintEventHandler(PrintDoc_BeginPrint);
printDoc.PrintPage -= new System.Drawing.Printing.PrintPageEventHandler(PrintDoc_PrintPage);
// Printing the Documnet
printDoc.Print();
printDoc.BeginPrint -= new System.Drawing.Printing.PrintEventHandler(PrintDoc_BeginPrint);
printDoc.PrintPage -= new System.Drawing.Printing.PrintPageEventHandler(PrintDoc_PrintPage);
catch (Exception ex)
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
private static void PrintDoc_BeginPrint(object sender,
System.Drawing.Printing.PrintEventArgs e)
// Formatting the Content of Text Cell to print
StrFormat = new StringFormat();
StrFormat.Alignment = StringAlignment.N
StrFormat.LineAlignment = StringAlignment.C
StrFormat.Trimming = StringTrimming.EllipsisC
// Formatting the Content of Combo Cells to print
StrFormatComboBox = new StringFormat();
StrFormatComboBox.LineAlignment = StringAlignment.C
StrFormatComboBox.FormatFlags = StringFormatFlags.NoW
StrFormatComboBox.Trimming = StringTrimming.EllipsisC
ColumnLefts.Clear();
ColumnWidths.Clear();
ColumnTypes.Clear();
CellHeight = 0;
RowsPerPage = 0;
// For various column types
CellButton = new Button();
CellCheckBox = new CheckBox();
CellComboBox = new ComboBox();
// Calculating Total Widths
TotalWidth = 0;
foreach (DataGridViewColumn GridCol in dgv.Columns)
if (!GridCol.Visible)
if (!PrintDGV.SelectedColumns.Contains(GridCol.HeaderText))
TotalWidth += GridCol.W
PageNo = 1;
RowPos = 0;
catch (Exception ex)
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
还有人帮下忙吗???
抱歉,昨天发错了,结果第三次发的的时候系统提示不能再发了,现在给你一个连接,你参考一下,即我做过所见所打的代码
来学习一下

我要回帖

更多关于 表示一样的词语 的文章

 

随机推荐