Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-24-2022, 01:07 AM
ArviLaanemets ArviLaanemets is offline Problems with lookup/search Formula Windows 8 Problems with lookup/search Formula Office 2016
Expert
 
Join Date: May 2017
Posts: 932
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default


One possible way.

After getting a new (calculated) table, you can replace all formulas in it with values (Copy - PasteSpecial>Values), and after that you can delete the original table.
Attached Files
File Type: xlsm FillColumnsExample.xlsm (12.0 KB, 11 views)
Reply With Quote
  #2  
Old 10-24-2022, 05:58 AM
kilroyscarnival kilroyscarnival is offline Problems with lookup/search Formula Windows 10 Problems with lookup/search Formula Office 2021
Expert
 
Join Date: May 2019
Posts: 358
kilroyscarnival is just really nicekilroyscarnival is just really nicekilroyscarnival is just really nicekilroyscarnival is just really nice
Default

Will you be typing in the first value in each instance (for example in cells A2 and B2, A6 and B6)?

I'm not quite sure of your full intentions, but I would think that something simple like
=if(C3="","",A2) placed in cell A3 would copy the A value above if the sector value is not empty. You'd do the same for B, and it would copy the value directly above, all the way down. Then you could manually fill in where the values change.

You could also simply merge the values with as many blank cells exist underneath. A bit of VBA code to go that would look like:

Sub Merge_Cells()
Dim blnks As Range, r As Range
Dim c As Long

For c = 1 To 2
On Error Resume Next
Set blnks = Columns(c).SpecialCells(xlBlanks)
On Error GoTo 0
If Not blnks Is Nothing Then
For Each r In blnks.Areas
With Union(r.Cells(0), r)
.Merge
.VerticalAlignment = xlCenter
End With
Next r
End If
Next c
End Sub

Of course you may not want it vertically centered. Also, this doesn't work with some imported data where the blank appearing cell isn't quite blank, so if you have issues with it, examine the cell contents and make sure they are empty.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
LOOKUP Formula error but WHY??? Haga Excel 1 04-17-2019 11:13 PM
N/A Value in Lookup Formula NickFazer Excel 2 04-02-2019 04:22 AM
Need help with lookup formula tristanlau Excel 1 08-14-2017 07:16 AM
Formula help please (lookup across multiple sheets) froggybsb03 Excel 2 03-16-2017 02:16 AM
How to search with column heading then doing the lookup action for below code cmreddy.vba Excel Programming 0 01-20-2015 03:44 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:24 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft