If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Adding part of a column in Excel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-30-08, 22:24
Mike375 Mike375 is offline
Registered User
 
Join Date: Apr 2004
Location: Sydney Australia
Posts: 369
Adding part of a column in Excel

Is there a way in Excel that I can add part of a column, based on the cell entries in another column.

I know how to Sum a range of cells but I don't know how to handle the situation with rows being added or deleted or an entry in a reference cell being changed.

My ideal solution would be if I could have the equivalent of unbound text boxes at the bottom of an Access tabular form whereby adding or deleting records or different sorts are taken care of.
Reply With Quote
  #2 (permalink)  
Old 01-31-08, 00:11
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
Howdy. Yes, something like this can be done. But can you post a sample workbook, including the expected result?

Also, you give two different criteria: 1) based on cell entries in another column (SUMIF if only one column, SUMPRODUCT with two or more columns), 2) "rows added or deleted". Can you clarify?
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
  #3 (permalink)  
Old 01-31-08, 02:37
Mike375 Mike375 is offline
Registered User
 
Join Date: Apr 2004
Location: Sydney Australia
Posts: 369
Attached Zip

As you will see Column P is "rent" and Column I is "view"

So what is required is the "rent" for different "views" So what is the rent being paid for Pool, City or whatever

I have enquired on behalf of a mate of mine. He wants to use Excel (and for very good reasons) but I don't have the knowledge in Excel.

Both of us did a bit with sorting and so Pool Views etc became cell range "whatever" but a resort of course gives the wrong answer. The spreadsheet gets replaced each month and during the month there are both additional rows added and rows deleted.

Many thanks for your offer of help.

Mike
Attached Files
File Type: zip PriceListOctober.zip (17.7 KB, 27 views)
Reply With Quote
  #4 (permalink)  
Old 01-31-08, 10:35
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
On the attachment I used an extra worksheet (Sheet4), and listed all the unique values in column B, taken from column I on Sheet1. Then in column C on Sheet4 I put the SUMIF formula and copied down:

=SUMIF(Sheet1!$I:$I,$B2,Sheet1!$P:$P)

Is that what you were looking for? If not, let me know.
Attached Files
File Type: zip PriceListOctober.zip (17.6 KB, 36 views)
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
  #5 (permalink)  
Old 01-31-08, 11:45
Mike375 Mike375 is offline
Registered User
 
Join Date: Apr 2004
Location: Sydney Australia
Posts: 369
Many thanks. That sure did work.

=SUMIF(Sheet1!$I:$I,$B2,Sheet1!$P:$P)

What does the ! and $ tell Excel. I think I remember seeing the $ with VLOOKUP, which appeared to be similar to DLookup in Access
Reply With Quote
  #6 (permalink)  
Old 01-31-08, 12:25
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
The exclamation point indicates that the reference prior to it is to a different worksheet (i.e. Sheet1) and is needed since the formula itself is on Sheet4.

The $ sign makes the reference absolute. The reference doesn't change columns if you copy it. If you want the columns to change, then take away the $ sign.

Thus:

$A$1 is an absolute reference to cell A1.

A$1 is absolute for the cell in row 1, but the column can change as it is copied

$A1, keeps the column reference absolute but the row number can change

A1 is relative, and will change column and row number.

===========

VLOOKUP is helpful, but even more flexibility/power comes by using INDEX/MATCH, which is high powered combination of VLOOKUP and HLOOKUP in one formula.
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On