Looking at the current macro mapping, I can see that both "paste formula" and "number format" are already implemented, but let me clarify what you're asking for:
Current Status:
Paste Formula - Already exists:
CapsLock + f → Paste Formulas
Number Format - Already exists:
CapsLock + 9 → General format
CapsLock + a → Accounting format
CapsLock + k → Thousands (comma)
CapsLock + 5 → Percent format
CapsLock + m → Month format
CapsLock + d → Date format
Possible Additions:
If you want to add more number formats or paste operations, here are some common ones that could be useful:
Additional Number Formats:
Currency format
Scientific notation
Fraction format
Custom number format dialog
Increase/decrease decimal places (already have and )
User
no like one operation (paste formulas and number formatting) might have to use paste special or do two alt key commands
Assistant
Ah, I understand now! You want a single operation that pastes formulas AND applies number formatting at the same time. This would be more efficient than doing two separate operations.
Here are a couple of approaches we could implement:
Option 1: Paste Special with Values + Formatting
Add a new hotkey that uses Paste Special to paste formulas and then immediately applies the current cell's number format:
ahk
User
no i think its alt hvs to do paste special and then R and then enter
Assistant
Ah yes, you're absolutely right! The ribbon sequence would be:
Alt + H → V → S → R → Enter
Alt + H = Home ribbon
V = Paste dropdown
S = Paste Special
R = Formats
Enter = Execute
So we can add this as a new hotkey. Here's how to implement it:
ahk:ahk/ExcelDatabookLayers.ahk
; Add this to the FORMAT section (around line 700)
SC03A & 7::Do(() => PasteFormulasWithFormat()) ; Paste Formulas + Format
; Add this function (around line 400, with other PasteSpecial functions)
PasteFormulasWithFormat() {
; Alt + H → V → S → R → Enter
Send("!h") ; Home ribbon
Wait(70)
Send("v") ; Paste dropdown
Wait()
Send("s") ; Paste Special
Wait(100)
Send("r") ; Formats
Wait(50)
Send("{Enter}")
ShowHUD("Paste Formulas + Format", 800)
}
User
implement this - replace our current caps lock S with this
Assistant
I'll implement this by replacing the current CapsLock + s (Paste Values Skip blanks) with the new Paste Formulas + Format function.
Edit file: ahk/ExcelDatabookLayers.ahk
undefined
Chunk 1
Lines added: 1, lines removed: 1
diff
y → Top double border
j → Left thick border
; → Right thick border
DIVIDERS & SIZING
q → Column width 0.5
F5 → AutoFit Columns
F6 → AutoFit Rows
F11 → Increase indent
F12 → Decrease indent
Numpad. → Add decimal place
Numpad0 → Remove decimal place
NAVIGATION
[ → Previous divider
] → Next divider
= → First block edge
- → Last block edge
, → Previous sheet
. → Next sheet
g → Go To
8 → Current Region
h → Home A1
Numpad8/2/4/6 → Ctrl+Arrow keys
Numpad7/9 → Ctrl+Home/End
DATA & CLEANUP
u → TRIM spaces
F8 → CLEAN characters
n → Convert to Number
e → Text to Columns
F7 → Toggle AutoFilter
F9 → Freeze panes
CLEAR Operations
z → Clear Formats
Backspace → Clear Contents
Delete → Clear All
HELP
Space → Show OSD with full mapping reference
Note: All operations use ribbon commands instead of COM functions for reliability. The system requires holding CapsLock while pressing the mapped key.
Numpad.
Numpad0
Additional Paste Operations:
Paste as Picture
Paste as Picture Link
Paste Validation
Paste Comments
Paste All Using Source Theme
Could you clarify what specific paste formula or number format functionality you'd like to add? For example:
A different type of formula paste?
Additional number format options?
A different key combination for existing functions?
Something completely new?
; Add this to the FORMAT section
SC03A & 7::Do(() => PasteFormulasWithFormat()) ; Paste Formulas + Format
; Add this function
PasteFormulasWithFormat() {
; Paste Special Formulas
Send("!h") ; Home ribbon
Wait(70)
Send("v") ; Paste dropdown
Wait()
Send("f") ; Formulas
Wait(100)
; Then apply number format from source
Send("!h") ; Home ribbon
Wait(70)
Send("v") ; Paste dropdown
Wait()
Send("r") ; Formatting
ShowHUD("Paste Formulas + Format", 800)
}
Option 2: Use Paste Special Dialog
A more reliable approach using the Paste Special dialog:
ahk
; Add this to the FORMAT section
SC03A & 7::Do(() => PasteFormulasWithFormat()) ; Paste Formulas + Format
; Add this function
PasteFormulasWithFormat() {
; Use Paste Special dialog for more control
Send("^!v") ; Paste Special dialog
Wait(100)
Send("f") ; Formulas
Wait(50)
Send("!r") ; Formats checkbox (Alt+R)
Wait(50)
Send("{Enter}")
ShowHUD("Paste Formulas + Format", 800)
}
Option 3: Custom Ribbon Sequence
If the above don't work reliably, we could create a custom sequence that mimics the user's manual process.
Which approach would you prefer? The second option (Paste Special dialog) is usually most reliable since it gives us explicit control over both formulas and formatting in one operation.
This would give you CapsLock + 7 to paste formulas with formatting in one operation, using the exact ribbon sequence you described. Much more efficient than doing two separate operations!
Now I need to add the PasteFormulasWithFormat() function. I'll place it with the other paste functions:
Edit file: ahk/ExcelDatabookLayers.ahk
undefined
Chunk 1
Lines added: 14, lines removed: undefined
diff
@@ -192,4 +192,18 @@
ShowHUD("Paste Link", 800)
}
+
+ PasteFormulasWithFormat() {
+ ; Alt + H → V → S → R → Enter
+ Send("!h") ; Home ribbon
+ Wait(70)
+ Send("v") ; Paste dropdown
+ Wait()
+ Send("s") ; Paste Special
+ Wait(100)
+ Send("r") ; Formats
+ Wait(50)
+ Send("{Enter}")
+ ShowHUD("Paste Formulas + Format", 800)
+ }
; -----------------------------------------------------------------------------
Perfect! I've successfully implemented the change:
Updated Mapping:
CapsLock + s now executes:
Alt + H → V → S → R → Enter
This will paste formulas with formatting in one operation
Shows "Paste Formulas + Format" tooltip
What Changed:
Before: CapsLock + s = Paste Values (Skip blanks)
After: CapsLock + s = Paste Formulas + Format
The function uses the exact ribbon sequence you specified (!hvsr{Enter}) and is now mapped to CapsLock + s for easy access. This combines both operations into a single, efficient hotkey.