SOLVED
Home

Create a pop up box for user data input that auto formulates specific cells

%3CLINGO-SUB%20id%3D%22lingo-sub-190050%22%20slang%3D%22en-US%22%3ECreate%20a%20pop%20up%20box%20for%20user%20data%20input%20that%20auto%20formulates%20specific%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-190050%22%20slang%3D%22en-US%22%3E%3CP%3EFor%20Excel%202010%2C%20I%20have%20two%20columns%20created%20for%20counting.%26nbsp%3B%20One%20counts%20up%20to%20a%20number%20and%20the%20other%20column%20counts%20backwards%20from%20that%20number%20to%201.%26nbsp%3B%20Ex.%20First%20column%20counts%20up%20to%2050%20and%20the%20second%20column%20counts%20backwards%20from%2050%20to%201%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20create%20a%20pop%20up%20box%20when%20the%20spreadsheet%20is%20first%20opened%20where%20the%20user%20inputs%20a%20value%20(ex.%2050)%20and%20it%20automatically%20fills%20the%20first%20and%20second%20columns%20appropriately.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-190050%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-307706%22%20slang%3D%22en-US%22%3ERe%3A%20Create%20a%20pop%20up%20box%20for%20user%20data%20input%20that%20auto%20formulates%20specific%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-307706%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3E%3CBR%20%2F%3EI'm%20looking%20for%20someone%20to%20assist%20me%20with%20my%20excel%20project.%20I%20want%20a%20pop%20form%20to%20appear%20when%20a%20cell%20is%20selected%2C%20to%20assist%20enter%20data%20in%20that%20cell%20and%20several%20other%20specific%20cells%2C%20either%20in%20that%20worksheet%20or%20other%20sheets%20within%20the%20same%20workbook.%20Or%20create%20a%20series%20of%20promting%20messages%20requiring%20completion%20of%20few%20other%20cells%20if%20a%20certain%20cell%20is%20filled%2C%20or%20something%20similar%20to%20prompt%20users%20to%20fill%20in%20multiple%20data%20in%20different%20locations%20using%20just%20one%20form.%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-307693%22%20slang%3D%22en-US%22%3ERe%3A%20Create%20a%20pop%20up%20box%20for%20user%20data%20input%20that%20auto%20formulates%20specific%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-307693%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3E%3CBR%20%2F%3EI'm%20looking%20for%20someone%20to%20assist%20me%20with%20my%20excel%20project.%20I%20want%20a%20pop%20form%20to%20appear%20when%20a%20cell%20is%20select%20to%20assist%20enter%20data%20in%20that%20cell%20and%20several%20other%20specific%20cells%20either%20in%20that%20worksheet%20or%20other%20sheets%20within%20the%20same%20workbook.%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-190348%22%20slang%3D%22en-US%22%3ERe%3A%20Create%20a%20pop%20up%20box%20for%20user%20data%20input%20that%20auto%20formulates%20specific%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-190348%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Sergei%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENo%20problem.%3C%2FP%3E%3CP%3EIt%20really%20isn't%20the%20best%20response%2C%20it%20lacked%20an%20error%20handler!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-190347%22%20slang%3D%22en-US%22%3ERe%3A%20Create%20a%20pop%20up%20box%20for%20user%20data%20input%20that%20auto%20formulates%20specific%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-190347%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENice%20to%20see%20you%20figured%20it%20out!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20I've%20updated%20the%20code%20with%20an%20error%20handler%20to%20catch%20any%20error%20that%20may%20occur%20%3CSPAN%20class%3D%22%22%3Eand%20prevent%20it%20from%20appearing%20so%20that%20it%20does%20not%20bother%20the%20end%20user.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20the%20updated%20version%3A%3C%2FP%3E%3CPRE%3ESub%20Workbook_Open()%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'Written%20by%20Haytham%20Amairah%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'Created%3A%205%2F3%2F2018%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'Last%20updated%3A%205%2F4%2F2018%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20On%20Error%20GoTo%20handler%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20number%20As%20Integer%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20number%20%3D%20Application.InputBox(%22Please%20enter%20a%20number%3A%22)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20If%20number%20%3D%20False%20Then%20Exit%20Sub%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20scell%20As%20Range%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Set%20scell%20%3D%20Application.InputBox(%22Please%20select%20the%20starting%20cell%3A%22%2C%20%2C%20%2C%20%2C%20%2C%20%2C%20%2C%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20For%20counter1%20%3D%201%20To%20number%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20r1%20As%20Integer%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20r1%20%3D%20counter1%20-%201%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20scell.Offset(r1).Value%20%3D%20counter1%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Next%20counter1%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20For%20counter2%20%3D%20number%20To%201%20Step%20-1%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20r2%20As%20Integer%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20r2%20%3D%20Abs(counter2%20-%20number)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20scell.Offset(r2%2C%202).Value%20%3D%20counter2%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Next%20counter2%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%3CBR%20%2F%3Ehandler%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%3CBR%20%2F%3EEnd%20Sub%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-190251%22%20slang%3D%22en-US%22%3ERe%3A%20Create%20a%20pop%20up%20box%20for%20user%20data%20input%20that%20auto%20formulates%20specific%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-190251%22%20slang%3D%22en-US%22%3E%3CP%3ENevermind%20I%20figured%20it%20out.%26nbsp%3B%20I%20just%20changed%20the%20offset%201%20value%20in%20%22scell.Offset(r2%2C%201).Value%20%3D%20counter2%22%20to%20however%20many%20columns%20I%20needed%20it%26nbsp%3B%20to%20move%20over.%26nbsp%3B%20Thanks%20again%20so%20much%20for%20your%20help.%26nbsp%3B%20You're%20awesome!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-190241%22%20slang%3D%22en-US%22%3ERe%3A%20Create%20a%20pop%20up%20box%20for%20user%20data%20input%20that%20auto%20formulates%20specific%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-190241%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Haytham%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESorry%2C%20my%20browser%20hangs%20for%20a%20while%20and%20I%20not%20intentionally%26nbsp%3B%20clicked%20on%20Best%20response%2C%20remove%20it%20after%20that.%20Perhaps%20that%20post%20is%20really%20Best%20response%2C%20but%20that's%20not%20my%20decision.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-190238%22%20slang%3D%22en-US%22%3ERe%3A%20Create%20a%20pop%20up%20box%20for%20user%20data%20input%20that%20auto%20formulates%20specific%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-190238%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20so%20much%20for%20your%20solution%20and%20doing%20the%20work.%26nbsp%3B%20It%20is%20very%20very%20close%20to%20what%20I%20need.%26nbsp%3B%20However%2C%20the%20countdown%20occurs%20in%20the%20second%20column.%26nbsp%3B%20I%20can't%20figure%20out%20how%20to%20get%20the%20countdown%20to%20populate%20in%20the%20third%20column%20instead%20of%20the%20second%20column.%26nbsp%3B%20So%20how%20do%20I%20change%20the%20column%20that%20it%20populates%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-190092%22%20slang%3D%22en-US%22%3ERe%3A%20Create%20a%20pop%20up%20box%20for%20user%20data%20input%20that%20auto%20formulates%20specific%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-190092%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20can%20be%20done%20with%20VBA%2C%20which%20is%20the%20Excel%20scripting%20language.%3C%2FP%3E%3CP%3EAnyway%2C%20I've%20done%20this%20for%20you%20in%20the%20attached%20file.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20solution%20is%20powered%20by%20this%20code%3A%3C%2FP%3E%3CPRE%3ESub%20Workbook_Open()%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'Written%20by%20Haytham%20Amairah%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'Last%20updated%20on%205%2F3%2F2018%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20number%20As%20Integer%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20number%20%3D%20Application.InputBox(%22Please%20enter%20a%20number%3A%22)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20scell%20As%20Range%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Set%20scell%20%3D%20Application.InputBox(%22Please%20select%20the%20starting%20cell%3A%22%2C%20%2C%20%2C%20%2C%20%2C%20%2C%20%2C%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20For%20counter1%20%3D%201%20To%20number%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20r1%20As%20Integer%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20r1%20%3D%20counter1%20-%201%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20scell.Offset(r1).Value%20%3D%20counter1%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Next%20counter1%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20For%20counter2%20%3D%20number%20To%201%20Step%20-1%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20r2%20As%20Integer%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20r2%20%3D%20Abs(counter2%20-%20number)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20scell.Offset(r2%2C%201).Value%20%3D%20counter2%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Next%20counter2%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EEnd%20Sub%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20follow%20this%20%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fautomatically-run-a-macro-when-opening-a-workbook-1e55959b-e077-4c88-a696-c3017600db44%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Elink%3C%2FA%3E%20to%20learn%20how%20to%20inject%20your%20own%20workbook%20with%20this%20code!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20hope%20this%20helps%20you%3C%2FP%3E%3CP%3EHaytham%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-873385%22%20slang%3D%22en-US%22%3ERe%3A%20Create%20a%20pop%20up%20box%20for%20user%20data%20input%20that%20auto%20formulates%20specific%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-873385%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35679%22%20target%3D%22_blank%22%3E%40Haytham%20Amairah%3C%2FA%3E%26nbsp%3B%20I%20am%20trying%20to%20access%20room%20list%20data%20from%20the%20second%20tab%20of%20my%20excel%20workbook%20by%20pressing%20a%20command%20button%20on%20the%20first%20tab.%20but%20the%20Room%20list%20in%20the%20second%20tab%20should%20appear%20as%20pop%20up%20window.%20is%20it%20possible%20in%20excel%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-877193%22%20slang%3D%22en-US%22%3ERe%3A%20Create%20a%20pop%20up%20box%20for%20user%20data%20input%20that%20auto%20formulates%20specific%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-877193%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F414539%22%20target%3D%22_blank%22%3E%40Fayarus%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%3EIt's%20best%20to%20post%20this%20question%20in%20a%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FExcel%2Fbd-p%2FExcelGeneral%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Eseparate%20conversation%3C%2FA%3E%20in%20this%20community%20because%20it's%20a%20different%20topic.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%3ERegards%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
blackwelldanny
Occasional Contributor

For Excel 2010, I have two columns created for counting.  One counts up to a number and the other column counts backwards from that number to 1.  Ex. First column counts up to 50 and the second column counts backwards from 50 to 1

 

I want to create a pop up box when the spreadsheet is first opened where the user inputs a value (ex. 50) and it automatically fills the first and second columns appropriately. 

10 Replies
Solution

Hi,

 

This can be done with VBA, which is the Excel scripting language.

Anyway, I've done this for you in the attached file.

 

This solution is powered by this code:

Sub Workbook_Open()
    'Written by Haytham Amairah
    'Last updated on 5/3/2018
    
    Dim number As Integer
    number = Application.InputBox("Please enter a number:")
    
    Dim scell As Range
    Set scell = Application.InputBox("Please select the starting cell:", , , , , , , 8)
       
    For counter1 = 1 To number
        Dim r1 As Integer
        r1 = counter1 - 1
        scell.Offset(r1).Value = counter1
    Next counter1
    
    For counter2 = number To 1 Step -1
        Dim r2 As Integer
        r2 = Abs(counter2 - number)
        scell.Offset(r2, 1).Value = counter2
    Next counter2
 
End Sub

 

Please follow this link to learn how to inject your own workbook with this code!

 

I hope this helps you

Haytham

Thank you so much for your solution and doing the work.  It is very very close to what I need.  However, the countdown occurs in the second column.  I can't figure out how to get the countdown to populate in the third column instead of the second column.  So how do I change the column that it populates?

Hi Haytham,

 

Sorry, my browser hangs for a while and I not intentionally  clicked on Best response, remove it after that. Perhaps that post is really Best response, but that's not my decision.

Nevermind I figured it out.  I just changed the offset 1 value in "scell.Offset(r2, 1).Value = counter2" to however many columns I needed it  to move over.  Thanks again so much for your help.  You're awesome!

Hi,

 

Nice to see you figured it out!

 

However, I've updated the code with an error handler to catch any error that may occur and prevent it from appearing so that it does not bother the end user.

 

This is the updated version:

Sub Workbook_Open()
    'Written by Haytham Amairah
    'Created: 5/3/2018
    'Last updated: 5/4/2018
    
    On Error GoTo handler
    
    Dim number As Integer
    number = Application.InputBox("Please enter a number:")
    
    If number = False Then Exit Sub
    
    Dim scell As Range
    Set scell = Application.InputBox("Please select the starting cell:", , , , , , , 8)
       
    For counter1 = 1 To number
        Dim r1 As Integer
        r1 = counter1 - 1
        scell.Offset(r1).Value = counter1
    Next counter1
    
    For counter2 = number To 1 Step -1
        Dim r2 As Integer
        r2 = Abs(counter2 - number)
        scell.Offset(r2, 2).Value = counter2
    Next counter2
        
handler:
    
End Sub

 

Regards

Hi Sergei,

 

No problem.

It really isn't the best response, it lacked an error handler!

Hi,

I'm looking for someone to assist me with my excel project. I want a pop form to appear when a cell is select to assist enter data in that cell and several other specific cells either in that worksheet or other sheets within the same workbook.

Thank you.
Hi,

I'm looking for someone to assist me with my excel project. I want a pop form to appear when a cell is selected, to assist enter data in that cell and several other specific cells, either in that worksheet or other sheets within the same workbook. Or create a series of promting messages requiring completion of few other cells if a certain cell is filled, or something similar to prompt users to fill in multiple data in different locations using just one form.

Thank you.

@Haytham Amairah  I am trying to access room list data from the second tab of my excel workbook by pressing a command button on the first tab. but the Room list in the second tab should appear as pop up window. is it possible in excel?

@Fayarus

 

Hi,

 

It's best to post this question in a separate conversation in this community because it's a different topic.

 

Regards

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
PacketMon Components are not loading in WAC 1909
HotCakeX in Windows Admin Center on
2 Replies