Add a column with custom cell values

SriDurga

New Member
Joined
Aug 30, 2022
Messages
19
Office Version
  1. 2019
Platform
  1. Windows
Book1
ABC
1IdDateWeek
2af2-NovWk45
3bd2-NovWk45
4rg2-NovWk45
5cv 2-NovWk45
6th2-NovWk45
7drg2-NovWk45
8dfg2-NovWk45
9ytu2-NovWk45
10sd2-NovWk45
11utj2-NovWk45
124et2-NovWk45
13j52-NovWk45
145yt2-NovWk45
15egjt2-NovWk45
16reth2-NovWk45
17dg52-NovWk45
Sheet1


Hello all,
I need to add a column named "Week" basis the file name "Wk45", kindly help me with VBA logic to add the column "Week" and cell values basis the file name "Wk45".
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Try =""Wk"&WEEKNUM(C2) and pull down.
( This supposes your week begins on Sunday)
See WEEKNUM function - Microsoft Support for syntax
If you need the ISO week number there is also a function for that
Hi, I need VBA for the same, as I need to merge multiple files, would need the last column to be the name of the file while merging different files.
 
Upvote 0
In the future, please add ALL your requirements from the start, to avoid wasting my time. Thx
(and some recognition for the provided help won't hurt either) :(
 
Upvote 0
In the future, please add ALL your requirements from the start, to avoid wasting my time. Thx
(and some recognition for the provided help won't hurt either) :(
Thank you and apologies for wasting your time.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,552
Members
449,088
Latest member
davidcom

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