Newbie Question

excelnewbie2023

New Member
Joined
Mar 9, 2023
Messages
6
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hello!

I apologize in advance for what is probably a very simple question but I have done quite a bit of digging on Google and can't find my answer, perhaps I am phrasing it wrong.

I am trying to compare sales for two different periods. I have two different sheets, one for each period. Each sheet has "Column A" that includes the customer number. "Column C" contains the sales amount for that period for each customer. In this case, I am comparing January 2022 with January 2023. I want to paste the figures from 2022 into the blank "Column D" so I can see the sales for each period side by side but I need Excel to match the figures with the customer number.

Basically, if the customer number matches in Column A, insert the numbers into Column D.

Hopefully my question makes sense and you're able to help me!

THANK YOU in advance! :)
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hi & welcome to MrExcel.
How about
Excel Formula:
=INDEX('January 2022'!$C$2:$C$1000,MATCH(A2,'January 2022'!$A$2:$A$1000,0))
Change sheet name to suit
 
Upvote 0
Solution
I think we are very close, but it didn't seem to work to copy all of the lines. Here are the two sheets:

This is sheet January 2022:

demo.xlsx
ABC
1No.NameAmount of Sales ($)
21010017demo1,799.63
31018603demo392.00
41018622demo2,209.98
51018645demo48.00
61018652demo1,444.93
71018658demo410.59
81018666demo26.97
91018673demo996.56
101018722demo1,532.58
111018740demo743.79
121018784demo2,352.00
131018802demo227.36
141018803demo29.86
151018806demo89.00
January 2022


This is sheet January 2023, where I want to take the data from column C in "January 2022" and add it to Column D in "January 2023", but I need it to match the customer numbers in Column A because, for example, some of the customers didn't buy again in January 2023 and are missing from the January 2023 sheet.

demo.xlsx
ABCD
1No.NameAmount of Sales ($)2022 Sales
21010017demo1,117.82
31018603demo202.90
41018645demo258.68
51018652demo259.78
61018658demo373.37
71018722demo572.28
81018740demo2,283.59
91018759demo59.50
101018793demo117.08
111018803demo7.98
121018806demo182.54
131018845demo219.98
January 2023
 
Upvote 0
In what way doesn't the formula work?
 
Upvote 0
I may be doing something wrong. If I paste that formula it keeps giving me the result from C2 on each row.
 
Upvote 0
Can you repost the 2023 sheet with the formula in place
 
Upvote 0
Here you go. I'm very ignorant when it comes to Excel, so please pardon if I'm making a very simple mistake.

demo.xlsx
ABCD
1No.NameAmount of Sales ($)2022 Sales
21010017demo1,117.821799.63
31018603demo202.901799.63
41018645demo258.681799.63
51018652demo259.781799.63
61018658demo373.371799.63
71018722demo572.281799.63
81018740demo2,283.591799.63
91018759demo59.501799.63
101018793demo117.081799.63
111018803demo7.981799.63
121018806demo182.541799.63
131018845demo219.981799.63
January 2023
Cell Formulas
RangeFormula
D2D2=INDEX('January 2022'!$C$2:$C$1000,MATCH(A2,'January 2022'!$A$2:$A$1000,0))
D3D3=INDEX('January 2022'!$C$2:$C$1000,MATCH(A2,'January 2022'!$A$2:$A$1000,0))
D4D4=INDEX('January 2022'!$C$2:$C$1000,MATCH(A2,'January 2022'!$A$2:$A$1000,0))
D5D5=INDEX('January 2022'!$C$2:$C$1000,MATCH(A2,'January 2022'!$A$2:$A$1000,0))
D6D6=INDEX('January 2022'!$C$2:$C$1000,MATCH(A2,'January 2022'!$A$2:$A$1000,0))
D7D7=INDEX('January 2022'!$C$2:$C$1000,MATCH(A2,'January 2022'!$A$2:$A$1000,0))
D8D8=INDEX('January 2022'!$C$2:$C$1000,MATCH(A2,'January 2022'!$A$2:$A$1000,0))
D9D9=INDEX('January 2022'!$C$2:$C$1000,MATCH(A2,'January 2022'!$A$2:$A$1000,0))
D10D10=INDEX('January 2022'!$C$2:$C$1000,MATCH(A2,'January 2022'!$A$2:$A$1000,0))
D11D11=INDEX('January 2022'!$C$2:$C$1000,MATCH(A2,'January 2022'!$A$2:$A$1000,0))
D12D12=INDEX('January 2022'!$C$2:$C$1000,MATCH(A2,'January 2022'!$A$2:$A$1000,0))
D13D13=INDEX('January 2022'!$C$2:$C$1000,MATCH(A2,'January 2022'!$A$2:$A$1000,0))
 
Upvote 0
Ok, they all return the same value as you are matching A2 on every row. Just put the formula in D2 & then drag it down.
 
Upvote 0
Ok, they all return the same value as you are matching A2 on every row. Just put the formula in D2 & then drag it down.
That is what I was doing wrong. It is working perfect now. THANK YOU SO MUCH!! This will save me a lot of time in the future, very much appreciated.
 
Upvote 0

Forum statistics

Threads
1,214,992
Messages
6,122,631
Members
449,095
Latest member
bsb1122

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