Question about Microsoft Excel for PC

1 Answer

Count how many times a value appears in a column, based on anothe

In a cell on worksheet 1, I want it to look to worksheet 2, column C, and count how many times the word 'EME' appears in column A, BUT ONLY if the value 1 appears in the adjacent column N on the same row.

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer

Go to the cell you want this total in.
Type this formula:
=SUM(IF(Sheet2!C1:C10="EME",IF(Sheet2!N1:N10=1,1,0)))
make sure you end the formula with CTRL - SHIFT - ENTER which makes it an array formula. If you forget, go back to the cell with this formula and press F2 (to edit the cell) and press CTRL - SHIFT - ENTER to convert it to an array formula (Excel will show a little {...} around the formula).

Posted on Dec 26, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Cell freeze 3 rows together at a time.


Freeze a Row in Microsoft Excel
Microsoft Excel 2010 can freeze, or lock, a top row as you scroll down the worksheet.
For example, you may need to keep the top row of column titles visible at all times.
The "View" tab on the command ribbon contains the "Freeze Panes" button in the "Window" group.
A single row or a range of rows can lock through the "Freeze Top Row" or "Freeze Panes" options.

Open the Excel worksheet.
Click the top row heading.
The row heading displays a number just left of the first column of cells. The selected row appears shaded.


Click the "View" tab on the command ribbon.
Click the "Freeze Panes" button in the "Window" group.
A list of options appears.

Click the "Freeze Top Row" option.
A black horizontal line appears on the worksheet.
This line indicates the locked row that stays on the screen as you scroll down the worksheet.

http://office.microsoft.com/en-us/excel-help/freeze-or-lock-rows-and-columns-HP010342542.aspx?CTT=1
Freeze or lock rows and columns
also
Use Freeze Panes in Excel
Scrolling down to look at a number and then scrolling up to make sure the number you looked at is under the header you expected is not an efficient way to view a spreadsheet.
The Freeze Panes feature of Excel allows you to freeze the labels of your data in place while you review the data.
Follow the instructions in Section 1 to freeze the top row or the left column.
Freeze multiple rows, multiple columns, or rows and columns, by following the instructions in Section 2.Freeze the Top Row or Left Column
1
Open the Excel spreadsheet.
2
Navigate to the "View" tab on the top menu.


3 Click on "View," then click on "Freeze Panes." A drop-down menu opens.

4

Select the "Freeze Top Row" option to freeze the top row.

5

Select the "Freeze Left Column" or "Freeze First Column" option to freeze the left column.

6

Freeze the top row by using the keyboard and sequentially pressing the keys "ALT, W, F, R." Ignore Steps 3 through 7 if using this choice.

7

Freeze the left column using the keyboard by sequentially pressing the keys "ALT, W, F, C." Ignore Steps 3 through 7 if using this choice.

8

Unfreeze panes by repeating Steps 3 through 5 and selecting "Unfreeze Panes" or sequentially press the keys "ALT, W, F, F."

Freeze Rows and Columns, Multiple Rows, Multiple Columns, or Multiple Rows and Columns
9

Open the Excel spreadsheet.

10

Freeze column(s) and row(s) at the same time by selecting the cell to the right of and below the location you want to freeze.

11

Freeze multiple rows only by selecting the cell in the left (first) column below the rows you want to freeze.

12

Freeze multiple columns only by selecting the cell in the top row to the right of the columns you want to freeze.

13

Navigate to the "View" tab on the top menu.

14

Click on "View," then click on "Freeze Panes." A drop-down menu opens.

15

Select the "Freeze Panes" option. You have now frozen the columns or rows, or columns and rows you designated.

16

Freeze panes using the keyboard by sequentially pressing the keys, "ALT, W, F, F." Ignore Steps 5 through 8 if using this choice.

17

Unfreeze panes by repeating Steps 5 through 7 and selecting "Unfreeze Panes" or sequentially press the keys, "ALT, W, F, F."



http://office.microsoft.com/en-us/excel-help/freeze-or-lock-rows-and-columns-HP001217048.aspx
Freeze or lock rows and columns
http://office.microsoft.com/en-us/excel-help/demo-hide-or-unhide-rows-and-columns-HA010241040.aspx
Hide or show rows and columns

Aug 14, 2013 | Microsoft Office Computers & Internet

Tip

How to export datagridview data to excel in C#


First, add this to your namespace.<br /><span style="font-weight: bold;">using Microsoft.Office.Interop.Excel;</span><br /><br />Then, copy the codes below and paste it into the export button click event.<br /><br /> <span style="font-weight: bold;">Microsoft.Office.Interop.Excel.Application wapp;</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> Microsoft.Office.Interop.Excel.Worksheet wsheet;</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> Microsoft.Office.Interop.Excel.Workbook wbook;</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> wapp = new Microsoft.Office.Interop.Excel.Application();</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> wapp.Visible = false;</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> wbook = wapp.Workbooks.Add(true);</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> wsheet = (Worksheet)wbook.ActiveSheet;</span><br style="font-weight: bold;" /><br style="font-weight: bold;" /><span style="font-weight: bold;"> if (dataGridView1.RowCount == 0)</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> {</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> mssgbox_noretrieve();</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> return;</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> }</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> try</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> {</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> for (int i = 0; i &lt; this.dataGridView1.Columns.Count; i++)</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> {</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> wsheet.Cells[1, i + 1] = this.dataGridView1.Columns[i].HeaderText;</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> }</span><br style="font-weight: bold;" /><br style="font-weight: bold;" /><span style="font-weight: bold;"> for (int i = 0; i &lt; this.dataGridView1.Rows.Count; i++)</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> {</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> DataGridViewRow row = this.dataGridView1.Rows[i];</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> for (int j = 0; j &lt; row.Cells.Count; j++)</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> {</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> DataGridViewCell cell = row.Cells[j];</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> try</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> {</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> wsheet.Cells[i + 2, j + 1] = (cell.Value == null) ? "" : cell.Value.ToString();</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> }</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> catch (Exception ex)</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> {</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> MessageBox.Show(ex.Message);</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> }</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> }</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> }</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> wapp.Visible = true;</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> }</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> catch (Exception ex1)</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> {</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> MessageBox.Show(ex1.Message);</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> }</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> wapp.UserControl = true;<br /><br /><br /><br /></span><br /> That's all and enjoy...<br /> Larrix<br /> <span style="font-weight: bold;"><br /></span>

on Jul 09, 2011 | Computers & Internet

Tip

How to datagridview to excel in C#


First, add this to your namespace.
using Microsoft.Office.Interop.Excel;

Then, copy the codes below and paste it into the export button click event.

Microsoft.Office.Interop.Excel.Application wapp;
Microsoft.Office.Interop.Excel.Worksheet wsheet;
Microsoft.Office.Interop.Excel.Workbook wbook;
wapp = new Microsoft.Office.Interop.Excel.Application();
wapp.Visible = false;
wbook = wapp.Workbooks.Add(true);
wsheet = (Worksheet)wbook.ActiveSheet;

if (dataGridView1.RowCount == 0)
{
mssgbox_noretrieve();
return;
}
try
{
for (int i = 0; i < this.dataGridView1.Columns.Count; i++)
{
wsheet.Cells[1, i + 1] = this.dataGridView1.Columns[i].HeaderText;
}

for (int i = 0; i < this.dataGridView1.Rows.Count; i++)
{
DataGridViewRow row = this.dataGridView1.Rows[i];
for (int j = 0; j < row.Cells.Count; j++)
{
DataGridViewCell cell = row.Cells[j];
try
{
wsheet.Cells[i + 2, j + 1] = (cell.Value == null) ? "" : cell.Value.ToString();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
wapp.Visible = true;
}
catch (Exception ex1)
{
MessageBox.Show(ex1.Message);
}
wapp.UserControl = true;




That's all and enjoy...
Larrix



on Jul 09, 2011 | Computers & Internet

2 Answers

Ranking values based on the number of times they appear/repeat


=SUM(IF((Ax:Ay="xxxxx"),1,0) Ax=starting cell Ay=ending cell "xxxxx"=text"

Jun 08, 2009 | Microsoft Excel for PC

1 Answer

Macro code for copying a range of cells from one Excell w/sheet t


You did not respond to my claification request. Here is some code that might help, it copies a selection of cells going down until an emty cell is found and across until an emty cell is found. This is form an earlier version of office but should comeclose to woring in 2007.

Sub copyrange()
'
' copyrange Macro
' Macro written by Royal 11/22/2008.
'


'save the return values
wksname = ActiveSheet.Name
returncell = ActiveCell.Address
searchfor = ActiveCell.Value

'go to first worksheet and find entered value (note this is a value serach)
Worksheets(1).Activate
findfor = "A1"
On Error Resume Next

findfor = Cells.Find(What:=searchfor, After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False).Address
If findfor = "A1" Then
erwks = ActiveSheet.Name
Sheets(wksname).Activate
er = MsgBox("Search item not found on Worksheet" + erwks, , "Search Error")
Exit Sub
Else
findfor.Activate
End If

Cells.FindNext(After:=ActiveCell).Activate

'save this address and start searching for copy area boundaries
begcell = ActiveCell.Address
begcl = ActiveCell.Cells.Column
begri = ActiveCell.Cells.Row
'search amaximum of 1000 rows and 676 columns
endri = begri + 1000
endcl = 26 * 26
maxrow = 0
maxcol = 0

For col = Cells.Column To endcl
If Cells(begri, col) = "" Then
maxcol = col
col = endcl
ri = endri
Else
ri = begri
End If
For ri = ri To (Cells.Row + 1000)
If Cells(ri, col) = "" Then
If ri > maxrow Then
maxrow = ri
End If
ri = endri
End If
Next ri
Next col

maxrow = maxrow - 1
maxcol = maxcol - 1

'copy the selected area
endcell = Cells(maxrow, maxcol).Address
crnge = begcell & ":" & endcell
Range(crnge).Select
Selection.Copy
'go back and paste it in
Sheets(wksname).Activate
Range(returncell).Select
' use this if yo want to paste formulas etc.
'ActiveSheet.Paste
' use this code if you want to paste values instead of formulas etc.
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range(returncell).Select

Nov 20, 2008 | Computers & Internet

Tip

How to find no. of rows and columns in Worksheet.


Hello everybody, this would be my first tip on FixYa.com. Number of people might not be aware how many rows and columns are there in Microsoft Worksheet.
This is how you can find out.
1. Select A1 cell in the worksheet
2. Now press Ctrl + down arrow from your keyboard, that will take you to the bottom of the row. You can find the number on the left side.
3. Again select A1 cell in the worksheet and press Ctrl + left arrow from your keyboard, that will take you to the last column of the worksheet. Now to number, just type "=column() " , without quotations, that will give you the number of the column.
Microsoft Worksheet columns is number from A to Z, again from AA to AZ, again from BA to BZ and so on till it reached IV in Excell 2003 and earlier version.
Microsoft Excel 2003 and old version has 16,777,216 cells per worksheet (65,536 rows * 256 columns).
Excel 2007 has 17,179,869,184 cells per worksheet (1,048,576 rows * 16,384 columns).


on Jul 27, 2010 | Microsoft Excel for PC

1 Answer

LINE 100


If Sale Line 100 is an Excel Template then it is simple.

The Templates are just preformatted spreadsheets which are edited just like any other spreadsheet.

If you mean that you are using the Template to create another document but wanting all the fields to be the same as the Invoice then I suggest the following method:

Copy the Template fron Worksheet 1 onto Worksheet 2.

Add and remove any fields that you wnt to add or remove (Prices would be deleted on this copy and the title would be changed from Invoice to Delivery Docket, etc)

Then (on Worksheet 2) in the fields that you want to be the same - click on the cell you want the same Data in and hit the = sign. Then go to Worksheet 1 and Click on the cell that you want the data to be the same. Hit Enter. This will send you back to Worksheet 2 and you will see that any data entered into the cell in Worksheet 1 will now also appear in Worksheet 2.

Repeat this process for all the cells you want copied from worksheet 1.

When you complete the data in Worksheet 1 (the Invoice) all the data selected will automatically appear in the cells selected on Worksheet 2.

Try this on worksheet 2 select cell A1, type =, then open worksheet 1 and select B1. You will be returned to worksheet 2 and the formula in cell A1 will now read =Sheet1!A1. Enter anything into Shhet 1 A1 and you will see that it appears in the appropriate cell on Sheet 2.

When you want to print off the Invoice and the Delivery Docket - you only have to open each Worksheet and hit Print and a copy of each worksheet will be printed giving you an Invoice and a Delivery Docket with the appropriate info on each printout (eg if you exclude prices from the Del. Docket then after completing all the details in the Invoice will create a Del Docket with all the relevant information other than the prices.

Does this answer your question?

Apr 25, 2008 | Computers & Internet

1 Answer

Exel 2003


You can refer to cells that are on other worksheets by perpending the name of the worksheet followed by an exclamation point (!) to the cell reference. In the following example, the AVERAGE worksheet function calculates the average value for the range C1:C10 on the worksheet named Marketing in the same workbook.

default.aspx?assetid=za010939481033 Refers to the worksheet named Marketing default.aspx?assetid=za010939491033 Refers to the range of cells between C1 and C10, inclusively
  1. Click the cell in which you want to enter the formula.
  2. In the formula bar (formula bar: A bar at the top of the Excel window that you use to enter or edit values or formulas in cells or charts. Displays the constant value or formula stored in the active cell.) default.aspx?assetid=za060515351033, type = (equal sign).
  3. Click the tab for the worksheet to be referenced.
  4. Select the cell or range of cells to be referenced.

Jan 01, 2008 | Microsoft Office Standard for PC

1 Answer

Using if and then to add values to a cell


Try using the SUMIF function for one condition or multiple conditions. Use the SUMIF worksheet function to create a total value for one range based on a value in another range. For example, for every cell in the rage B5:B25 that contains the value "Northwind", the following formula calculates the total for the corresponding cells in the range F5:F25. Formula:
=sumif(B5:B25,"Northwind",F5:F25)

Here are SUMIF functions for multiple conditions.

=sum(if((B5:B25="Northwind")*(C5:C25="Western"),F5:F25))

=sum(if((B5:B25="Northwind")+(C5:C25="Western"),F5:F25))

=sum(if(B5:B25="Northwind",IF(C5:C25="Western"),1,0)))

Also check your help for SUMIF functions.

If this helps you, Please rate me. Thanks, Patty

Dec 09, 2007 | Computers & Internet

Not finding what you are looking for?
Microsoft Excel for PC Logo

1,492 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

micky dee

Level 3 Expert

2644 Answers

Piyal Perera
Piyal Perera

Level 3 Expert

528 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18386 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...