extract data from sheet2 into sheet1

Just2learn

New Member
Joined
Feb 16, 2011
Messages
11
I have a workbook with two sheets. Sheet1 is simple it has a list of customers and a total column. Sheet2 has all the customers data. I need to pull the total by customer from sheet2 into sheet1. The problem I am having is the customer total cell on sheet2 is not always in the same place. i.e. the data may be on one line as in A ONE FURNITURE, or more than one as in the STARSHINE BEST line.

A ONE FURNITURE LLC 332.79
CUSTOMER TOTAL: 332.79

STARSHINE BEST LLC AR2198-0209 72129 619.94
STARSHINE BEST LLC FREIGHT CHARGE/P 721289 0
STARSHINE BEST LLC GA1803-0214 72240 1805.64
STARSHINE BEST LLC FREIGHT CHARGE/D 72239L 0
STARSHINE BEST LLC MI2203-0307 72486 328
STARSHINE BEST LLC FREIGHT CHARGE/P 724850 0
CUSTOMER TOTAL: 2753.58

BACKYARD PLEASURES 3963 72330 639
BACKYARD PLEASURES 3963 72331 8434.48
BACKYARD PLEASURES FREIGHT CHARGE/P72329 0
BACKYARD PLEASURES 3963 72420 3592.34
CUSTOMER TOTAL: 12665.82

I need to pull these customer totals into sheet1 that matches the customers name. There may be as many 900 customer names on sheet1. Any help would be greatly appreciated.....
 
I tried the sumif before posting to the forum but it returned zeros at times when it should have returned a sum I could not figure out why it wouldn't sum.
 
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
In Sheet2!B:B at the end of the customer name should have a space. Try this

=SUMIF(Sheet2!B:B,$A2&"*",Sheet2!F:F)
 
Upvote 0
It seems so easy now...I believe I learned something about (&"*") when you put the star inside the quotes is that what says leave a space at the end? Thanks for the solution now I can go to bed. Thank you....
 
Upvote 0
A2&"*" means If there is anything after the value in A2, spaces other charracter or anything., it would SUM. If doesn't have anything after A2 value in Sheet2!B:B still SUM this customer.

See excel help or search google about wild card characters
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top