#1   Report Post  
Allan
 
Posts: n/a
Default Function or Code

Greetings
I am not sure whether my goal can be acccomplished through a funtion or if I
will have to use code. I have an inventory spreadsheet that has part numbers
on hand qty and on order qty.
Part #
On Hand
On Order

Because of the layout of the sheet the Part# may appear in different rows or
different columns, but its always in row 3,6,9, etc. I would like to either
through input box and code, or a formula be able to enter the part# and get
the total on hand and on order.
Thanks

  #2   Report Post  
Gary Brown
 
Posts: n/a
Default

'Sumif' seems best here.
For Example,
if the part # can be in Col A, B or C and the On-Hand Qty is in Col D, put
the Part # in E1 and put the following formula in E2...
=SUMIF(A:A,E1,D:D)+SUMIF(B:B,E1,D:D)+SUMIF(C:C,E1, D:D)

HTH,
Gary


"Allan" wrote:

Greetings
I am not sure whether my goal can be acccomplished through a funtion or if I
will have to use code. I have an inventory spreadsheet that has part numbers
on hand qty and on order qty.
Part #
On Hand
On Order

Because of the layout of the sheet the Part# may appear in different rows or
different columns, but its always in row 3,6,9, etc. I would like to either
through input box and code, or a formula be able to enter the part# and get
the total on hand and on order.
Thanks

  #3   Report Post  
Allan
 
Posts: n/a
Default

Hi Gary
Thanks for the reply....
What if a3=PART#1
A2=15 (on hand)
A3=5 (on order)
C9=PART#1
C10= 10 (on hand)
C11= 10 (On order)

In a21 user inputs Part#1 and a22 is calculated to 25 and a23 is calculated
to 15.
Thanks
"Gary Brown" wrote:

'Sumif' seems best here.
For Example,
if the part # can be in Col A, B or C and the On-Hand Qty is in Col D, put
the Part # in E1 and put the following formula in E2...
=SUMIF(A:A,E1,D:D)+SUMIF(B:B,E1,D:D)+SUMIF(C:C,E1, D:D)

HTH,
Gary


"Allan" wrote:

Greetings
I am not sure whether my goal can be acccomplished through a funtion or if I
will have to use code. I have an inventory spreadsheet that has part numbers
on hand qty and on order qty.
Part #
On Hand
On Order

Because of the layout of the sheet the Part# may appear in different rows or
different columns, but its always in row 3,6,9, etc. I would like to either
through input box and code, or a formula be able to enter the part# and get
the total on hand and on order.
Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening a file with code without a set file name jenkinspat Excel Discussion (Misc queries) 1 March 4th 05 10:50 AM
Error trapped only while stepping through the code - Not triggered when run Jeff Excel Discussion (Misc queries) 0 February 28th 05 06:26 PM
UDF and Calculation tree Ken Wright Links and Linking in Excel 1 February 6th 05 04:58 PM
Trim function doesn't clean out ASCII Code 160 (Space) Ronald Dodge Excel Worksheet Functions 6 January 27th 05 03:48 AM
How to resize a comment box, by embedding code into a function? JJ Excel Worksheet Functions 13 November 16th 04 08:44 PM


All times are GMT +1. The time now is 01:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"