Insert a new column after each column and populate its value based on the column adjacent to it

Amir Wisal

New Member
Joined
Oct 25, 2021
Messages
16
Office Version
  1. 365
Platform
  1. Windows
Hi Good People,

Can you please help me add a new column after each column (starting from column B) to the very end and populate the values of the newly inserted column based on row 1.

For example, the code shall insert a new column after column B and also populate the newly inserted column with the value OS (as mentioned in the column right before it in Cell "B1". Same approach goes for all other columns. After column C, i will insert a new column and the value of that column shall be the value of cell C1 and so on.

Please note that i want the newly inserted column to have the value mentioned in row 1 (obviously based on the relevant column) however i want that value to be pasted all the way down the very end of the data. In this particular spreadsheet, i have 46 rows which might be changed next time so i want the code to be dynamic

I hope i am clear with my instruction. Sample file is also attached for your reference. Desired result is attached as image

Thank you.

Dummy Data.xlsx
A
1Value
Sheet2
 

Attachments

  • Desired results.PNG
    Desired results.PNG
    10.7 KB · Views: 6

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi All,

Sorry i copied the wrong range before.

Dummy Data.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAW
1ValueOSDimensionsWeightSIMColors2Gncy3G4GChipsetsorTechnologyySizeResolutionProtectionExtraColumn1CardFeaturesFrontWLANtivityBluetoothGPSUSBNFCDataSensorsesAudioBrowsergGamesTorchCapacityyTalktimeMusicplayPriceRatingse Ratgs5GCPUsorChipsetGPUStandby PriNewRadioStandbyy Pr PricBrowseres
2Apple iPhone 11IOS 13150.9 x 75.7 x 8.3 mm189 gDual Sim, Dual Standby (Nano-SIM)Black, Green, Yellow, Purple, Red, WhiteSIM1: GSM 850 / 900 / 1800 / 1900SIM2: GSM 850 / 900 / 1800 / 1900HSDPA 850 / 900 / 1700(AWS) / 1900 / 2100LTE band 1(2100), 2(1900), 3(1800), 4(1700/2100), 5(850), 7(2600), 8(900), 12(700), 13(700), 17(700), 18(800), 19(800), 20(800), 25(1900), 26(850), 28(700), 29(700), 30(2300), 34(2000), 38(2600), 39(1900), 40(2300), 41(2500), 66(1700/2100)Apple A13 (7 nm+)Liquid Retina IPS LCD Capacitive Touchscreen, 16M Colors, Multitouch6.1 Inches828 x 1792 Pixels (~324 PPI)Scratch-resistant glassNoPhase detection, OIS, Geo-tagging, touch focus, face/smile detection, HDR (photo/panorama), Video (2160p@24/30/60fps, 1080p@30/60/120/240fps, HDR, stereo sound rec.)Dual 12 MP TOF 3D camera, HDR, Video (2160p@24/30/60fps, 1080p@30/60/120fps, gyro-EIS)Wi-Fi 802.11 a/b/g/n/ac/ad, dual-band, hotspotv5.0 with A2DP, LEYes + A-GPS support, & GLONASS, GALILEO, QZSS2.0, proprietary reversible connectorYesGPRS, Edge, 3G HSPA, 4G LTE-A, EV-DO Rev.A 3.1 MbpsAccelerometer, Face ID, Barometer, Compass, Gyro, ProximityLightning to 3.5 mm headphone jack adapter, MP3/WAV/AAX+/AIFF/Apple Lossless player, MP4/H.264 player, Speaker PhoneHTML5 (Safari)iMessage, SMS (threaded view), MMS, Email, Push EmailBuilt-in + DownloadableYes(Li-ion Non removable), 3110 mAhup to 17 hrsup to 65 hrsPrice in Rs: 144,900 Price in USD: $1080Average Rating is 4.1 stars - basears - based on 216 user reviews.
3Apple iPhone 11 ProIOS 13144 x 71.4 x 8.1 mm188 gDual Sim, Dual Standby (Nano-SIM)Space Gray, Silver, Gold, Midnight GreenSIM1: GSM 850 / 900 / 1800 / 1900SIM2: GSM 850 / 900 / 1800 / 1900HSDPA 850 / 900 / 1700(AWS) / 1900 / 2100LTE band 1(2100), 2(1900), 3(1800), 4(1700/2100), 5(850), 7(2600), 8(900), 12(700), 13(700), 17(700), 18(800), 19(800), 20(800), 25(1900), 26(850), 28(700), 29(700), 30(2300), 34(2000), 38(2600), 39(1900), 40(2300), 41(2500), 66(1700/2100)Apple A13 (7 nm+)Super Retina XDR OLED Capacitive Touchscreen, 16M Colors, Multitouch5.8 Inches1125 x 2436 Pixels (~463 PPI)Scratch-resistant glassNof/1.8 & f/2.4, phase detection, OIS, 2x optical zoom, Geo-tagging, simultaneous 4K video and 8MP image recording, touch focus, face/smile detection, HDR (photo/panorama), Video (2160p@24/30/60fps, 1080p@30/60/120/240fps, HDR, stereo sound rec.)Dual 12 MP TOF 3D camera, HDR, Video (2160p@24/30/60fps, 1080p@30/60/120fps, gyro-EIS))Wi-Fi 802.11 a/b/g/n/ac/ad, dual-band, hotspotv5.0 with A2DP, LEYes + A-GPS support, & GLONASS, GALILEO, QZSS2.0, proprietary reversible connectorYesGPRS, Edge, 3G (HSPA 42.2/5.76 Mbps), 4G (LTE-A 1.6 Gbps DL, EV-DO Rev.A 3.1 Mbps)Accelerometer, Face ID, Barometer, Compass, Gyro, ProximityLightning to 3.5 mm headphone jack adapter, MP3/WAV/AAX+/AIFF/Apple Lossless player, MP4/H.264 player, Speaker PhoneHTML5 (Safari)iMessage, SMS (threaded view), MMS, Email, Push EmailBuilt-in + DownloadableYes(Li-ion Non removable), 3190 mAhup to 18 hrsup to 65 hrsPrice in Rs: 207,800 Price in USD: $1549Average Rating is 4 stars - bass - based on 98 user reviews.
4Apple iPhone 11 Pro MaxIOS 13157.5 x 77.4 x 8.1 mm226 gDual Sim, Dual Standby (Nano-SIM)Space Gray, Silver, Gold, Midnight GreenSIM1: GSM 850 / 900 / 1800 / 1900SIM2: GSM 850 / 900 / 1800 / 1900HSDPA 850 / 900 / 1700(AWS) / 1900 / 2100LTE band 1(2100), 2(1900), 3(1800), 4(1700/2100), 5(850), 7(2600), 8(900), 12(700), 13(700), 17(700), 18(800), 19(800), 20(800), 25(1900), 26(850), 28(700), 29(700), 30(2300), 34(2000), 38(2600), 39(1900), 40(2300), 41(2500), 66(1700/2100)Apple A13 (7 nm+)Super Retina XDR OLED Capacitive Touchscreen, 16M Colors, Multitouch6.5 Inches1242 x 2688 Pixels (~456 PPI)Scratch-resistant glassNophase detection, OIS, 2x optical zoom, Geo-tagging, touch focus, face/smile detection, HDR (photo/panorama), Video (2160p@24/30/60fps, 1080p@30/60/120/240fps)Dual 12 MP + TOF 3D camera, HDR, Video (2160p@24/30/60fps, 1080p@30/60/120fps, gyro-EIS)Wi-Fi 802.11 a/b/g/n/ac, dual-band, hotspotv5.0 with A2DP, LEYes + A-GPS support, & GLONASS, GALILEO, QZSS2.0, proprietary reversible connectorYesGPRS, Edge, 3G (HSPA 42.2/5.76 Mbps), 4G (LTE-A 1.6 Gbps DL, EV-DO Rev.A 3.1 Mbps)Accelerometer, Face ID, Barometer, Compass, Gyro, ProximityLightning to 3.5 mm headphone jack adapter, MP3/WAV/AAX+/AIFF/Apple Lossless player, MP4/H.264 player, Speaker PhoneHTML5 (Safari)iMessage, SMS (threaded view), MMS, Email, Push EmailBuilt-in + DownloadableYes(Li-ion Non removable), 3500 mAhup to 20 hrsup to 80 hrsPrice in Rs: 226,599 Price in USD: $1689Average Rating is 3.9 stars - basears - based on 218 user reviews.
5Apple iPhone 12IOS 14.1146.7 x 71.5 x 7.4 mm164 gDual Sim, Dual Standby or eSIM (Nano-SIM)Black, White, Red, Green, BlueSIM1: GSM 850 / 900 / 1800 / 1900SIM2: GSM 850 / 900 / 1800 / 1900HSDPA 850 / 900 / 1700(AWS) / 1900 / 2100LTE band 1(2100), 2(1900), 3(1800), 4(1700/2100), 5(850), 7(2600), 8(900), 12(700), 13(700), 17(700), 18(800), 19(800), 20(800), 25(1900), 26(850), 28(700), 29(700), 30(2300), 34(2000), 38(2600), 39(1900), 40(2300), 41(2500), 66(1700/2100)Super Retina XDR OLED Capacitive Touchscreen, 16M Colors, Multitouch6.1 Inches1170 x 2532 Pixels (~457 PPI)Scratch-resistant glass, oleophobic coatingNoPhase detection, OIS, Geo-tagging, touch focus, face/smile detection, HDR (photo/panorama), Video (4K@24/30/60fps, 1080p@30/60/120/240fps, HDR, Dolby Vision HDR (up to 30fps), stereo sound rec.)Dual 12 MP, f/2.2, 23mm (wide), 1/3.6 + SL 3D, (depth/biometrics sensor), HDR, Video (4K@24/30/60fps, 1080p@30/60/120fps, gyro-EIS)Wi-Fi 802.11 a/b/g/n/ac/6, dual-band, hotspotv5.0 with A2DP, LEYes + A-GPS support, & GLONASS, GALILEO, QZSSLightning, USB 2.0YesGPRS, Edge, 3G (HSPA 42.2/5.76 Mbps), 4G LTE-A, 5G capable, EV-DO Rev.A 3.1 MbpsAccelerometer, Compass, Face ID, Gyro, ProximityLightning to 3.5 mm headphone jack adapter, MP3/WAV/AAX+/AIFF/Apple Lossless player, MP4/H.264 player, Speaker PhoneHTML5 (Safari)iMessage, SMS (threaded view), MMS, Email, Push EmailBuilt-in + DownloadableYes(Li-ion Non removable), 2815 mAhup to 65 hrsPrice in Rs: 175,520 Price in USD: $1088Average Rating is 4.7 stars - basars - based on 36 user reviews.SA/NSA/Sub6/mmWaveHexa-core (2 x 3.1 GHz Firestorm + 4 x 1.8 GHz Icestorm)Apple A14 Bionic (5 nm)Apple GPU (4-core graphics)up to 17 hrs
6Apple iPhone 12 MiniIOS 14.1131.5 x 64.2 x 7.4 mm135 gDual Sim, Dual Standby or eSIM (Nano-SIM)Black, White, Red, Green, BlueSIM1: GSM 850 / 900 / 1800 / 1900SIM2: GSM 850 / 900 / 1800 / 1900HSDPA 850 / 900 / 1700(AWS) / 1900 / 2100LTE band 1(2100), 2(1900), 3(1800), 4(1700/2100), 5(850), 7(2600), 8(900), 12(700), 13(700), 17(700), 18(800), 19(800), 20(800), 25(1900), 26(850), 28(700), 29(700), 30(2300), 34(2000), 38(2600), 39(1900), 40(2300), 41(2500), 66(1700/2100)Super Retina XDR OLED Capacitive Touchscreen, 16M Colors, Multitouch5.4 Inches1080 x 2340 Pixels (~477 PPI)Scratch-resistant glass, oleophobic coatingNoPhase detection, OIS, Geo-tagging, touch focus, face/smile detection, HDR (photo/panorama), Video (4K@24/30/60fps, 1080p@30/60/120/240fps, HDR, Dolby Vision HDR (up to 30fps), stereo sound rec.)Dual 12 MP, f/2.2, 23mm (wide), 1/3.6 + SL 3D, (depth/biometrics sensor), HDR, Video (4K@24/30/60fps, 1080p@30/60/120fps, gyro-EIS)Wi-Fi 802.11 a/b/g/n/ac/6, dual-band, hotspotv5.0 with A2DP, LEYes + A-GPS support, & GLONASS, GALILEO, QZSSLightning, USB 2.0YesGPRS, Edge, 3G (HSPA 42.2/5.76 Mbps), 4G LTE-A, 5G capable, EV-DO Rev.A 3.1 MbpsAccelerometer, Face ID, Barometer, Compass, Gyro, ProximityLightning to 3.5 mm headphone jack adapter, MP3/WAV/AAX+/AIFF/Apple Lossless player, MP4/H.264 player, Speaker PhoneHTML5 (Safari)iMessage, SMS (threaded view), MMS, Email, Push EmailBuilt-in + DownloadableYes(Li-ion Non removable), 2227 mAhup to 50 hrsPrice in Rs: 157,292 Price in USD: $1172Average Rating is 4.3 stars - basars - based on 11 user reviews.SA/NSA/Sub6/mmWaveHexa-core (2 x 3.1 GHz Firestorm + 4 x 1.8 GHz Icestorm)Apple A14 Bionic (5 nm)Apple GPU (4-core graphics)up to 15 hrs
7Apple iPhone 12 ProIOS 14.1146.7 x 71.5 x 7.4 mm189 gDual Sim, Dual Standby or eSIM (Nano-SIM)Silver, Graphite, Gold, Pacific BlueSIM1: GSM 850 / 900 / 1800 / 1900SIM2: GSM 850 / 900 / 1800 / 1900HSDPA 850 / 900 / 1700(AWS) / 1900 / 2100LTE band 1(2100), 2(1900), 3(1800), 4(1700/2100), 5(850), 7(2600), 8(900), 12(700), 13(700), 17(700), 18(800), 19(800), 20(800), 25(1900), 26(850), 28(700), 29(700), 30(2300), 34(2000), 38(2600), 39(1900), 40(2300), 41(2500), 66(1700/2100)Super Retina XDR OLED Capacitive Touchscreen, 16M Colors, Multitouch6.1 Inches1170 x 2532 Pixels (~457 PPI)Scratch-resistant glass, oleophobic coatingNophase detection, OIS, 2x optical zoom, Geo-tagging, , touch focus, face/smile detection, HDR (photo/panorama), Video (4K@24/30/60fps, 1080p@30/60/120/240fps, 10‑bit HDR, Dolby Vision HDR (up to 60fps), stereo sound rec.)Dual 12 MP, f/2.2, 23mm (wide), 1/3.6 + SL 3D, (depth/biometrics sensor), HDR, Video (4K@24/30/60fps, 1080p@30/60/120fps, gyro-EIS)Wi-Fi 802.11 a/b/g/n/ac/6, dual-band, hotspotv5.0 with A2DP, LEYes + A-GPS support, & GLONASS, GALILEO, QZSSLightning, USB 2.0YesGPRS, Edge, 3G (HSPA 42.2/5.76 Mbps), 4G LTE-A, 5G capable, EV-DO Rev.A 3.1 MbpsAccelerometer, Compass, Face ID, Gyro, ProximityLightning to 3.5 mm headphone jack adapter, MP3/WAV/AAX+/AIFF/Apple Lossless player, MP4/H.264 player, Speaker PhoneHTML5 (Safari)iMessage, SMS (threaded view), MMS, Email, Push EmailBuilt-in + DownloadableYes(Li-ion Non removable), 2815 mAhup to 65 hrsPrice in Rs: 238,050 Price in USD: $1774Average Rating is 4.3 stars - basars - based on 50 user reviews.5G SA/NSA/Sub6/mmWaveHexa-core (2 x 3.1 GHz Firestorm + 4 x 1.8 GHz Icestorm)Apple A14 Bionic (5 nm)Apple GPU (4-core graphics)up to 17 hrs
8Apple iPhone 12 Pro MaxIOS 14.1160.8 x 78.1 x 7.4 mm228 gDual Sim, Dual Standby (Nano-SIM)Silver, Graphite, Gold, Pacific BlueSIM1: GSM 850 / 900 / 1800 / 1900SIM2: GSM 850 / 900 / 1800 / 1900HSDPA 850 / 900 / 1700(AWS) / 1900 / 2100LTE band 1(2100), 2(1900), 3(1800), 4(1700/2100), 5(850), 7(2600), 8(900), 12(700), 13(700), 17(700), 18(800), 19(800), 20(800), 25(1900), 26(850), 28(700), 29(700), 30(2300), 34(2000), 38(2600), 39(1900), 40(2300), 41(2500), 66(1700/2100)Super Retina XDR OLED Capacitive Touchscreen, 16M Colors, Multitouch6.7 Inches1284 x 2778 Pixels (~457 PPI)Scratch-resistant glass, oleophobic coatingNoGeo-tagging, touch focus, face/smile detection, HDR (photo/panorama), Video (4K@24/30/60fps, 1080p@30/60/120/240fps, HDR, Dolby Vision HDR (up to 60fps), stereo sound rec.)Dual 12 MP, f/2.2, 23mm (wide), 1/3.6 + SL 3D, (depth/biometrics sensor), HDR, Video (4K@24/30/60fps, 1080p@30/60/120fps, gyro-EIS)Wi-Fi 802.11 a/b/g/n/ac/6, dual-band, hotspotv5.0 with A2DP, LEYes + A-GPS support, & GLONASS, GALILEO, QZSSLightning, USB 2.0YesGPRS, Edge, 3G (HSPA 42.2/5.76 Mbps), 4G LTE-A, 5G capable, EV-DO Rev.A 3.1 Mbps)Accelerometer, Barometer, Compass, Face ID, Gyro, ProximityLightning to 3.5 mm headphone jack adapter, MP3/WAV/AAX+/AIFF/Apple Lossless player, MP4/H.264 player, Speaker PhoneHTML5 (Safari)iMessage, SMS (threaded view), MMS, Email, Push EmailBuilt-in + DownloadableYes(Li-ion Non removable), 3687 mAhup to 80 hrsPrice in Rs: 297,830 Price in USD: $2219Average Rating is 4 stars - bases - based on 154 user reviews.SA/NSA/Sub6/mmWaveHexa-core (2 x 3.1 GHz Firestorm + 4 x 1.8 GHz Icestorm)Apple A14 Bionic (5 nm)Apple GPU (4-core graphics)up to 20 hrs
9Apple iPhone 13IOS 15146.7 x 71.5 x 7.7 mm174 gDual Sim, Dual Standby or eSIM (Nano-SIM)Starlight, Midnight, Blue, Pink, RedSIM1: GSM 850 / 900 / 1800 / 1900SIM2: GSM 850 / 900 / 1800 / 1900HSDPA 850 / 900 / 1700(AWS) / 1900 / 2100LTESuper Retina XDR OLED Capacitive Touchscreen, Multitouch6.1 Inches1170 x 2532 Pixels (~457 PPI)Scratch-resistant ceramic glass, oleophobic coatingNoVideo (4K@24/30/60fps, 1080p@30/60/120/240fps, HDR, Dolby Vision HDR (up to XXfps), stereo sound rec.).Dual 12 MP, f/2.2, 23mm (wide), 1/3.6 + SL 3D, (depth/biometrics sensor), HDR, Video (4K@24/25/30/60fps, 1080p@30/60/120fps, gyro-EIS)Wi-Fi 802.11 a/b/g/n/ac/6, dual-band, hotspotv5.0 with A2DP, LEYes + A-GPS support, & GLONASS, GALILEO, QZSSLightning, USB 2.0YesGPRS, Edge, 3G (HSPA 42.2/5.76 Mbps), 4G LTE-A, 5G, (EV-DO Rev.A 3.1 Mbps)Accelerometer, Barometer, Compass, Face ID, Gyro, ProximityLightning to 3.5 mm headphone jack adapter, MP3/WAV/AAX+/AIFF/Apple Lossless player, MP4/H.264 player, Speaker PhoneYesiMessage, SMS (threaded view), MMS, Email, Push EmailBuilt-in + DownloadableYes(Li-ion Non removable), 3240 mAhup to 75 hrsAverage Rating is 5 stars - bas - based on 2 user reviews.Sub6/mmWaveHexa-core (2 x 3.22 GHz + 4xX.X GHz)Apple A15 Bionic (5 nm)Apple GPU (4-core graphics)up to 19 hrsPrice in Rs: Coming Soon (Expected Rs: 200,49 (Expected Rs: 200,499) Price in USD: $NA
Sheet2
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Insert a new column after each column and populate its value based on the column adjacent to it
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Insert a new column after each column and populate its value based on the column adjacent to it
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
Thank you Fluff for pointing out, i am new to these forums and was not aware of the forums rules. I will go through the rules in details and will be more cautious next time.

Cheers
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

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