Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have an excel spreadsheet linked to a network printer, it contains a list of what each user printed, how many pages, and the total cost. It is constantly updated. The total cost column contains the wrong price, so Im using this formula: =SUM(D2/C2)*(H2) in EACH field on the total user cost column to extract the CORRECT price. So, I started my macro, highlighted the entire TOTAL COST column, then inserted my formula into each field in that column. The correct price displays for rows that contain data, but I am getting "#DIV/0!" on the rows that do not contain data. This is fine, but when I try to create a SUBTOTAL (Data -- Subtotals) for each user, I get the following error: "To prevent possible loss of data, Microsoft Excel cannot shift nonblank cells off the worksheet." Can you help me write an IF statement that basically says: IF there is data in this field than use the formula =SUM(D2/C2)*(H2), and if there is NOT data in this field then leave the cell blank? Thank you... -- Abe85 ------------------------------------------------------------------------ Abe85's Profile: http://www.excelforum.com/member.php...o&userid=35270 View this thread: http://www.excelforum.com/showthread...hreadid=551059 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I convert conditional formatting into explicit formatting? | Excel Discussion (Misc queries) | |||
Formatting Conditional Formatting Icon Sets | Excel Discussion (Misc queries) | |||
Formatting cells in a column with conditional formatting? | Excel Discussion (Misc queries) | |||
Protect Cell Formatting including Conditional Formatting | Excel Discussion (Misc queries) | |||
Conditional Formatting that will display conditional data | Excel Worksheet Functions |