Mis-aligned data

Hatter

New Member
Joined
Apr 12, 2024
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi, need assistance on where to begin. I have data that once in excel is mis-aligned, supplier names above PO etc. A) is there a way to get the data re-aligned or B) a formula that would look at the next cell upwards that has text?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Since we do not have access to that file in order to see it, we really don't know what you mean.
Can you show us an image of your data, so we can see exactly how it is mis-aligned?
 
Upvote 0
OrderReceivedVarianceSupplierInvoiceVar
Supplier / Order No - Required - Status / ProductUoMQtyKgsUoMQtyKgsQtyKgsUnit £Total £Total ££
000001 - Supplier A
110​
110.00​
110​
110.00​
100%​
100%​
389.4​
355.3​
91%​
PO1234 - 09/01/2024 - Complete
110​
110.00​
110​
110.00​
100%​
100%​
389.4​
355.3​
91%​
10000000 - Product ZEACH
110​
110.00​
EACH
110​
110.00​
100%​
100%​
3.54​
389.4​
000002 - Supplier B
28000​
28000.00​
28100​
28100.00​
100%​
100%​
39200​
39340​
100%​
PO1235 - 09/01/2024 - Complete
28000​
28000.00​
28100​
28100.00​
100%​
100%​
39200​
39340​
100%​
100000001- Product YEACH
28000​
28000.00​
EACH
28100​
28100.00​
100%​
100%​
1.4​
39200​
000003- Supplier C
660​
32.74​
651​
32.29​
99%​
99%​
37665​
48555​
129%​
PO1236 - 09/01/2024 - Complete
390​
19.35​
390​
19.35​
100%​
100%​
21060​
21060​
100%​
10000002 - Product XCASE
390​
19.35​
CASE
390​
19.35​
100%​
100%​
54​
21060​
PO1237 - 09/01/2024 - Live
270​
13.39​
261​
12.95​
97%​
97%​
16605​
27495​
166%​
10000003 - Product WCASE
270​
13.39​
CASE
261​
12.95​
97%​
97%​
61.5​
16605​
000004 - Supplier D
1920​
1920.00​
1920​
1920.00​
100%​
100%​
7555.2​
7555.2​
100%​
PO1238 - 09/01/2024 - Complete
1920​
1920.00​
1920​
1920.00​
100%​
100%​
7555.2​
7555.2​
100%​
10000004 - Product VEACH
1920​
1920.00​
EACH
1920​
1920.00​
100%​
100%​
3.935​
7555.2​
000005 - Supplier E
7080​
7080.00​
7080​
7080.00​
100%​
100%​
42293.28​
42293.28​
100%​
PO1239 - 09/01/2024 - Complete
7080​
7080.00​
7080​
7080.00​
100%​
100%​
42293.28​
42293.28​
100%​
10000005 - Product UEACH
1080​
1080.00​
EACH
1080​
1080.00​
100%​
100%​
6.116​
6605.28​
10000006 - Product TEACH
6000​
6000.00​
EACH
6000​
6000.00​
100%​
100%​
5.948​
35688​

Example above, aim is for a report/graph to be shown in percentages on GR and Invoice variances. The data comes out mis-aligned, Supplier C has two orders and supplier data is not directly above as like the others.
 
Upvote 0
I think we are still very confused as to your ultimate design goal here.
To help people help you, make it easy to understand for us.

One simple way is to show us a complete example (you know what they say, "a picture says 1000 words!).
By complete example, I mean the following:
1. Show us the BEFORE picture (what your data looks like to start)
2. Show us the AFTER picture (what you want it to look like after the VBA code runs to do the changes you want)

You have shown us one of those pictures (I assume the BEFORE), but not the second.
Please show us the second, for extra sample data you provided.
 
Upvote 0
How about we start with this and you tell us where you want to go from here ?
We can use VBA to produce this if or a variation if you give us more detail on what you want to finish up with.
In the below just delete the left hand side, copy in the latest data at A1, make sure the formulas extend to the bottom on the right hand side.
Then put a filter or pivot over the right hand side.

20240415 VBA Realign data Hatter.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF
1Supplier / Order No - Required - Status / ProductUoMQtyKgsUoMQtyKgsQtyKgsUnit £Total £Total ££Line TypeSupplierPOProductUoMQtyKgsUoMQtyKgsQtyKgsUnit £Total £Total ££
2000001 - Supplier A110110110110100%100%389.4355.391%Supplier000001 - Supplier A  01101100110110110389.4355.30.91
3PO1234 - 09/01/2024 - Complete110110110110100%100%389.4355.391%PO000001 - Supplier APO1234 - 09/01/2024 - Complete 01101100110110110389.4355.30.91
410000000 - Product ZEACH110110EACH110110100%100%3.54389.4Product000001 - Supplier APO1234 - 09/01/2024 - Complete10000000 - Product ZEACH110110EACH110110113.54389.400
5000002 - Supplier B28000280002810028100100%100%3920039340100%Supplier000002 - Supplier BPO1234 - 09/01/2024 - Complete10000000 - Product Z028000280000281002810011039200393401
6PO1235 - 09/01/2024 - Complete28000280002810028100100%100%3920039340100%PO000002 - Supplier BPO1235 - 09/01/2024 - Complete10000000 - Product Z028000280000281002810011039200393401
7100000001- Product YEACH2800028000EACH2810028100100%100%1.439200Product000002 - Supplier BPO1235 - 09/01/2024 - Complete100000001- Product YEACH2800028000EACH2810028100111.43920000
8000003- Supplier C66032.7465132.2999%99%3766548555129%Supplier000003- Supplier CPO1235 - 09/01/2024 - Complete100000001- Product Y066032.74065132.290.990.99037665485551.29
9PO1236 - 09/01/2024 - Complete39019.3539019.35100%100%2106021060100%PO000003- Supplier CPO1236 - 09/01/2024 - Complete100000001- Product Y039019.35039019.3511021060210601
1010000002 - Product XCASE39019.35CASE39019.35100%100%5421060Product000003- Supplier CPO1236 - 09/01/2024 - Complete10000002 - Product XCASE39019.35CASE39019.3511542106000
11PO1237 - 09/01/2024 - Live27013.3926112.9597%97%1660527495166%PO000003- Supplier CPO1237 - 09/01/2024 - Live10000002 - Product X027013.39026112.950.970.97016605274951.66
1210000003 - Product WCASE27013.39CASE26112.9597%97%61.516605Product000003- Supplier CPO1237 - 09/01/2024 - Live10000003 - Product WCASE27013.39CASE26112.950.970.9761.51660500
13000004 - Supplier D1920192019201920100%100%7555.27555.2100%Supplier000004 - Supplier DPO1237 - 09/01/2024 - Live10000003 - Product W0192019200192019201107555.27555.21
14PO1238 - 09/01/2024 - Complete1920192019201920100%100%7555.27555.2100%PO000004 - Supplier DPO1238 - 09/01/2024 - Complete10000003 - Product W0192019200192019201107555.27555.21
1510000004 - Product VEACH19201920EACH19201920100%100%3.9357555.2Product000004 - Supplier DPO1238 - 09/01/2024 - Complete10000004 - Product VEACH19201920EACH19201920113.9357555.200
16000005 - Supplier E7080708070807080100%100%42293.342293.3100%Supplier000005 - Supplier EPO1238 - 09/01/2024 - Complete10000004 - Product V07080708007080708011042293.2842293.281
17PO1239 - 09/01/2024 - Complete7080708070807080100%100%42293.342293.3100%PO000005 - Supplier EPO1239 - 09/01/2024 - Complete10000004 - Product V07080708007080708011042293.2842293.281
1810000005 - Product UEACH10801080EACH10801080100%100%6.1166605.28Product000005 - Supplier EPO1239 - 09/01/2024 - Complete10000005 - Product UEACH10801080EACH10801080116.1166605.2800
1910000006 - Product TEACH60006000EACH60006000100%100%5.94835688Product000005 - Supplier EPO1239 - 09/01/2024 - Complete10000006 - Product TEACH60006000EACH60006000115.9483568800
Formula
Cell Formulas
RangeFormula
Q2:Q19Q2=IF($A2<>"","Supplier",IF($B2<>"","PO",IF($C2<>"","Product","")))
R2:T19R2=IF(A2<>"",A2,IF(ROW(A1)<>1,R1,""))
U2:AF19U2=IF($A2<>"",D2,IF($B2<>"",C2,IF($C2<>"",D2,"")))
 
Upvote 0

Forum statistics

Threads
1,215,206
Messages
6,123,636
Members
449,109
Latest member
Sebas8956

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