Help with if statement containing a sort function

dallash

New Member
Joined
Apr 10, 2020
Messages
9
Office Version
  1. 365
Platform
  1. Windows
I am not sure if that exactly what I am trying to do but ultimately I am trying to make an end of day sheet. It would only have 3 worksheets.

The cover would be the printable page split into 3 payment methods credit, paypay and store credit. I would collect all this information form the following to reports that I would paste in each day.

COVER PAGE
Order IDNS Document NumberSubtotal (inc tax)Subtotal (ex tax)Tax TotalShipping Cost (inc tax)Shipping Cost (ex tax)Coupon DetailsRefund AmountCustomer NamePayment MethodStore Credit Redeemed
Stripe
Paypal
Charge account

Page two is the sales report from my online store for containing the order id in column A which would be the value used to lookup all other information. Column J contains the Payment Method. Depending the payment method I would need the value from column A to populate on on the first worksheet in the correct area either under stripe (Credit Card), Paypal, or Charge account. From there I can do any of the other formulas to finish the sheet.

PAGE TWO

Order IDSubtotal (inc tax)Subtotal (ex tax)Tax TotalShipping Cost (inc tax)Shipping Cost (ex tax)Coupon DetailsRefund AmountCustomer NamePayment MethodStore Credit Redeemed
256​
206.8​
196.95​
9.85​
0​
0​
0​
Shannon KirtzingerCredit Card
0​
257​
84.32​
80.31​
4.01​
0​
0​
0​
Deryl GallatinCredit Card
0​
258​
119.25​
113.55​
5.7​
0​
0​
0​
Shaun HeglinCredit Card
0​
259​
617​
587.62​
29.38​
0​
0​
0​
Paul Glandonstorecredit
617​
55555​
5555​
55​
55​
0​
0​
0​
testPayPal
617​

Here is an example of what I am trying to accomplish, can anyone tell me what to do? I feel like it should be so simple, but I think because its in the same column I can't wrap my head around how to get the right thing to go where I want it. Is this possible?

Order IDNS Document NumberSubtotal (inc tax)Subtotal (ex tax)Tax TotalShipping Cost (inc tax)Shipping Cost (ex tax)Coupon DetailsRefund AmountCustomer NamePayment MethodStore Credit Redeemed
Stripe
256
257
258
Paypal
55555
Charge account
259

 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
I can recommend a Power Query solution (which sounds awful and complicated, but the opposite is true). You have MSO 365, so probably You have Get & Transform on your ribbon?
You can load via a mouse click both tables to PQ and append the data. Where column headers match, the data ends up in the same column. Then you can group by Payment method, order ID, customer name and coupon details, and aggregate your totals using the SUM/COUNT.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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