Help Please!!!

sdc1234

Board Regular
Joined
Mar 17, 2011
Messages
122
I have 2 fields that I want to push over and store everytime a new title is entered: ex: aa3 title and bb3 date, once i enter data in these cells I want them to populate over to ww3 and xx3. now when I enter new data into aa3 and bb3 I want the new data to populate over to ww3 and xx3 and the original #'s to move yy3 and zz3 any help on this will be appreciated.....
 

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 this on a copy of your workbook, adjust ranges to suit;
Code:
Sub MoveDate()
    
    Select Case Range("F3").Value
    Case Is = ""
    Range("A3:B3").Select
    Selection.Cut
    Range("F3").Select
    ActiveSheet.Paste
    
    Case Else
    
    Range("F3").Select
    Range(Selection, Selection.End(xlToRight)).Select
    Selection.Copy
    Range("H3").Select
    ActiveSheet.PasteSpecial Format:=3, Link:=1, DisplayAsIcon:=False, _
        IconFileName:=False
        
    Range("A3:B3").Select
    Selection.Cut
    Range("F3").Select
    ActiveSheet.Paste
    End Select
End Sub

HTH
Colin
 
Upvote 0
Ooops, just noticed that you have aa3 & bb3! are you saying you have 28 columns between the title and the date? and that you want these 2 separate cells moving over and retain the 28 column gap?
 
Upvote 0
no they r right nxt to each other, actually my fields r in Z3 and AA3 then they move over to AI3 &AJ3
 
Last edited:
Upvote 0
OK, try this, Paste this into a module, and run it;
Code:
Sub MoveDate()
    
    Select Case Range("AI3").Value
    Case Is = ""
    Range("Z3:AA3").Select
    Selection.Cut
    Range("AI3").Select
    ActiveSheet.Paste
    
    Case Else
    
    Range("AI3").Select
    Range(Selection, Selection.End(xlToRight)).Select
    Selection.Copy
    Range("AK3").Select
    ActiveSheet.PasteSpecial Format:=3, Link:=1, DisplayAsIcon:=False, _
        IconFileName:=False
        
    Range("Z3:AA3").Select
    Selection.Cut
    Range("AI3").Select
    ActiveSheet.Paste
    End Select
End Sub

HTH
Colin
 
Upvote 0
:) its working thank u the only thing that id s an issue now is the fact that the code is throwing a 40253 into AO3 instead of the pushing the job over any advise
 
Last edited:
Upvote 0
Change the format from 3 to 12
From:
Code:
ActiveSheet.PasteSpecial Format:=3,
To:
Code:
ActiveSheet.PasteSpecial Format:=12,

HTH
Colin
 
Upvote 0

Forum statistics

Threads
1,224,506
Messages
6,179,158
Members
452,892
Latest member
yadavagiri

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